Merge "fix: Fix delete swift folder"
This commit is contained in:
commit
ee77a5eab3
@ -87,6 +87,9 @@ export default class BaseClient {
|
||||
if (!id) {
|
||||
return resourceName;
|
||||
}
|
||||
if (!resourceName) {
|
||||
return id;
|
||||
}
|
||||
if (resourceName[resourceName.length - 1] === '/') {
|
||||
return `${resourceName.substr(0, resourceName.length - 1)}/${id}`;
|
||||
}
|
||||
|
@ -20,26 +20,6 @@ class SwiftClient extends Base {
|
||||
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() {
|
||||
return true;
|
||||
}
|
||||
|
@ -59,8 +59,8 @@ export default class Delete extends ConfirmAction {
|
||||
return globalObjectStore.delete(data);
|
||||
}
|
||||
const store = new ObjectStore();
|
||||
const { container, name: folder } = data;
|
||||
const records = await store.fetchListByPage({ container, folder });
|
||||
const { container, name } = data;
|
||||
const records = await store.fetchList({ container, path: name });
|
||||
if (records.length > 0) {
|
||||
this.showConfirmErrorBeforeSubmit = true;
|
||||
this.confirmErrorMessageBeforeSubmit = t(
|
||||
|
Loading…
Reference in New Issue
Block a user