Files
tonePage/apps/frontend/lib/api/oss/index.ts
2025-12-12 17:25:26 +08:00

13 lines
313 B
TypeScript

import fetcher from "../fetcher";
export interface StsToken {
AccessKeyId: string;
AccessKeySecret: string;
Expiration: string;// ISO 8601 格式
SecurityToken: string;
userId: string;
}
export async function getStsToken() {
return fetcher<StsToken>('/api/oss/sts', { method: 'GET' });
}