mirror of
https://github.com/jiangrui1994/CloudSaver.git
synced 2026-01-12 08:08:46 +08:00
Initial commit for open-source version
This commit is contained in:
23
frontend/src/api/quark.ts
Normal file
23
frontend/src/api/quark.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import request from "@/utils/request";
|
||||
import type { ShareInfoResponse, Folder, SaveQuarkFileParams } from "@/types";
|
||||
|
||||
export const quarkApi = {
|
||||
async getShareInfo(pwdId: string, passcode = ""): Promise<ShareInfoResponse> {
|
||||
const { data } = await request.get("/api/quark/share-info", {
|
||||
params: { pwdId, passcode },
|
||||
});
|
||||
return data;
|
||||
},
|
||||
|
||||
async getFolderList(parentCid = "0"): Promise<{ data: Folder[] }> {
|
||||
const { data } = await request.get("/api/quark/folders", {
|
||||
params: { parentCid },
|
||||
});
|
||||
return data;
|
||||
},
|
||||
|
||||
async saveFile(params: SaveQuarkFileParams) {
|
||||
const { data } = await request.post("/api/quark/save", params);
|
||||
return data;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user