feat!(front): migrate to Hey API
All checks were successful
Build and Deploy Go App / build (push) Successful in 5m51s
Build and Deploy Go App / deploy (push) Successful in 35s

This commit is contained in:
nihonium 2025-12-04 11:30:35 +03:00
parent 128a33824a
commit 6e802d2402
Signed by: nihonium
GPG key ID: 0251623741027CFC
47 changed files with 2865 additions and 1209 deletions

View file

@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { useParams, Link } from "react-router-dom";
import { DefaultService } from "../../api/services/DefaultService";
import type { Title } from "../../api";
// import { DefaultService } from "../../api/services/DefaultService";
import { getTitle, type Title } from "../../api";
import { TitleStatusControls } from "../../components/TitleStatusControls/TitleStatusControls";
export default function TitlePage() {
@ -19,8 +19,9 @@ export default function TitlePage() {
const fetchTitle = async () => {
setLoading(true);
try {
const data = await DefaultService.getTitle(titleId, "all");
setTitle(data);
// const data = await DefaultService.getTitle(titleId, "all");
const data = await getTitle({path: {title_id: titleId}})
setTitle(data?.data ?? null);
setError(null);
} catch (err: any) {
console.error(err);