MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / RefreshToken

Function RefreshToken

packages/filesystem/auth.ts:17–35  ·  view source on GitHub ↗
(
  netDiskType: NetDiskType,
  refreshToken: string
)

Source from the content-addressed store, hash-verified

15}
16
17export function RefreshToken(
18 netDiskType: NetDiskType,
19 refreshToken: string
20): Promise<{
21 code: number;
22 msg: string;
23 data: { token: { access_token: string; refresh_token: string } };
24}> {
25 return fetch(ExtServerApi + `auth/net-disk/token/refresh?netDiskType=${netDiskType}`, {
26 method: "POST",
27 headers: {
28 "Content-Type": "application/json",
29 },
30 body: JSON.stringify({
31 netDiskType,
32 refreshToken,
33 }),
34 }).then((resp) => resp.json());
35}
36
37export async function NetDisk(netDiskType: NetDiskType) {
38 try {

Callers 1

refreshPromiseFnFunction · 0.85

Calls 1

jsonMethod · 0.45

Tested by

no test coverage detected