fix: 修复了一堆API错误,并顺手添加了OSS API

This commit is contained in:
2025-12-19 19:12:13 +08:00
parent 7d16d0d9e7
commit d2e64a70d2
13 changed files with 42 additions and 27 deletions

View File

@@ -1,11 +1,11 @@
// import { OssApi } from "@/lib/api";
import { OSSAPI } from "@/lib/api/client";
import { toast } from "sonner";
import useSWR from "swr";
export function useOssSts() {
const { data: stsTokenData, isLoading, error, mutate } = useSWR(
'/api/oss/sts',
// () => OssApi.getStsToken(),
() => OSSAPI.getStsToken(),
{
shouldRetryOnError: false,
// refreshInterval: 59 * 60 * 1000,