feat: update storage schema (#1142)

This commit is contained in:
boojack
2023-02-24 00:02:51 +08:00
committed by GitHub
parent 84fb8b2288
commit 9c5b44d070
9 changed files with 271 additions and 229 deletions

View File

@ -215,15 +215,15 @@ export function deleteTag(tagName: string) {
}
export function getStorageList() {
return axios.get<ResponseObject<Storage[]>>(`/api/storage`);
return axios.get<ResponseObject<ObjectStorage[]>>(`/api/storage`);
}
export function createStorage(storageCreate: StorageCreate) {
return axios.post<ResponseObject<Storage>>(`/api/storage`, storageCreate);
return axios.post<ResponseObject<ObjectStorage>>(`/api/storage`, storageCreate);
}
export function patchStorage(storagePatch: StoragePatch) {
return axios.patch<ResponseObject<Storage>>(`/api/storage/${storagePatch.id}`, storagePatch);
return axios.patch<ResponseObject<ObjectStorage>>(`/api/storage/${storagePatch.id}`, storagePatch);
}
export function deleteStorage(storageId: StorageId) {