(netDiskType: NetDiskType)
| 7 | export type NetDiskType = "baidu" | "onedrive" | "googledrive" | "dropbox"; |
| 8 | |
| 9 | export function GetNetDiskToken(netDiskType: NetDiskType): Promise<{ |
| 10 | code: number; |
| 11 | msg: string; |
| 12 | data: { token: { access_token: string; refresh_token: string } }; |
| 13 | }> { |
| 14 | return fetch(ExtServerApi + `auth/net-disk/token?netDiskType=${netDiskType}`).then((resp) => resp.json()); |
| 15 | } |
| 16 | |
| 17 | export function RefreshToken( |
| 18 | netDiskType: NetDiskType, |