封装ossStore
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
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<{
|
||||
AccessKeyId: string;
|
||||
AccessKeySecret: string;
|
||||
Expiration: string;// ISO 8601 格式
|
||||
SecurityToken: string;
|
||||
userId: string;
|
||||
}>('/api/oss/sts', { method: 'GET' });
|
||||
return fetcher<StsToken>('/api/oss/sts', { method: 'GET' });
|
||||
}
|
||||
Reference in New Issue
Block a user