Spaces:
Sleeping
Sleeping
File size: 641 Bytes
f0953a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import request from "@/utils/request";
import type { ShareInfoResponse, Folder, SaveFileParams, GetShareInfoParams } from "@/types";
export const quarkApi = {
async getShareInfo(params: GetShareInfoParams) {
const { data } = await request.get<ShareInfoResponse>("/api/quark/share-info", {
params,
});
return data as ShareInfoResponse;
},
async getFolderList(parentCid = "0") {
const data = await request.get<Folder[]>("/api/quark/folders", {
params: { parentCid },
});
return data;
},
async saveFile(params: SaveFileParams) {
return await request.post("/api/quark/save", params);
},
};
|