1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-31 02:59:44 +02:00

delete space, mov doc edge cases

This commit is contained in:
Harvey Kandola 2017-09-26 20:13:44 +01:00
parent 5481de4e1c
commit 8d761da939
11 changed files with 117 additions and 125 deletions

View file

@ -96,22 +96,6 @@ export default BaseService.extend({
});
},
// getProtectedFolderInfo returns non-private folders and who has access to them.
getProtectedFolderInfo() {
return this.get('ajax').request(`space?filter=viewers`, {
method: "GET"
}).then((response) => {
let data = [];
data = response.map((obj) => {
let data = this.get('store').normalize('protected-folder-participant', obj);
return this.get('store').push(data);
});
return data;
});
},
// reloads and caches folders.
reload() {
return this.get('ajax').request(`space`, {
@ -185,4 +169,20 @@ export default BaseService.extend({
return data2;
});
},
// returns all spaces -- for use by documize admin user
adminList() {
return this.get('ajax').request(`space/manage`, {
method: "GET"
}).then((response) => {
let data = [];
data = response.map((obj) => {
let data = this.get('store').normalize('folder', obj);
return this.get('store').push(data);
});
return data;
});
}
});