Merge "fix: Fix delete swift folder"
This commit is contained in:
commit
ee77a5eab3
@ -87,6 +87,9 @@ export default class BaseClient {
|
|||||||
if (!id) {
|
if (!id) {
|
||||||
return resourceName;
|
return resourceName;
|
||||||
}
|
}
|
||||||
|
if (!resourceName) {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
if (resourceName[resourceName.length - 1] === '/') {
|
if (resourceName[resourceName.length - 1] === '/') {
|
||||||
return `${resourceName.substr(0, resourceName.length - 1)}/${id}`;
|
return `${resourceName.substr(0, resourceName.length - 1)}/${id}`;
|
||||||
}
|
}
|
||||||
|
@ -20,26 +20,6 @@ class SwiftClient extends Base {
|
|||||||
return swiftBase();
|
return swiftBase();
|
||||||
}
|
}
|
||||||
|
|
||||||
get checkNameCode() {
|
|
||||||
return {
|
|
||||||
200: 'container exists',
|
|
||||||
401: 'user not login',
|
|
||||||
403: 'not allow to access this container',
|
|
||||||
404: 'not found this container',
|
|
||||||
500: 'other exception',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
get checkNameCodeObject() {
|
|
||||||
return {
|
|
||||||
200: 'container exists',
|
|
||||||
401: 'user not login',
|
|
||||||
403: 'not allow to access this container',
|
|
||||||
404: 'not found this container',
|
|
||||||
500: 'other exception',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
get projectInUrl() {
|
get projectInUrl() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,8 @@ export default class Delete extends ConfirmAction {
|
|||||||
return globalObjectStore.delete(data);
|
return globalObjectStore.delete(data);
|
||||||
}
|
}
|
||||||
const store = new ObjectStore();
|
const store = new ObjectStore();
|
||||||
const { container, name: folder } = data;
|
const { container, name } = data;
|
||||||
const records = await store.fetchListByPage({ container, folder });
|
const records = await store.fetchList({ container, path: name });
|
||||||
if (records.length > 0) {
|
if (records.length > 0) {
|
||||||
this.showConfirmErrorBeforeSubmit = true;
|
this.showConfirmErrorBeforeSubmit = true;
|
||||||
this.confirmErrorMessageBeforeSubmit = t(
|
this.confirmErrorMessageBeforeSubmit = t(
|
||||||
|
Loading…
Reference in New Issue
Block a user