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