mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-10 08:33:53 +01:00
Added more actions on identities:
* create/edit/delete alias * edit/delete account
This commit is contained in:
@@ -20,5 +20,8 @@ export default {
|
||||
},
|
||||
patch (accountId, data) {
|
||||
return repository.patch(`${resource}/${accountId}/`, data)
|
||||
},
|
||||
delete (accountId, data) {
|
||||
return repository.post(`${resource}/${accountId}/delete/`, data)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import repository from './repository'
|
||||
|
||||
const resource = 'aliases'
|
||||
|
||||
export default {
|
||||
get (aliasId) {
|
||||
return repository.get(`${resource}/${aliasId}/`)
|
||||
},
|
||||
getRandomAddress () {
|
||||
return repository.get(`${resource}/random_address/`)
|
||||
},
|
||||
validate (data) {
|
||||
return repository.post(`${resource}/validate/`, data)
|
||||
},
|
||||
create (data) {
|
||||
return repository.post(`${resource}/`, data)
|
||||
},
|
||||
patch (aliasId, data) {
|
||||
return repository.patch(`${resource}/${aliasId}/`, data)
|
||||
},
|
||||
delete (aliasId) {
|
||||
return repository.delete(`${resource}/${aliasId}/`)
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,13 @@ export default {
|
||||
getApplications () {
|
||||
return repository.get(`/${resource}/applications/`)
|
||||
},
|
||||
getAppliction (app) {
|
||||
getApplication (app) {
|
||||
return repository.get(`/${resource}/${app}/`)
|
||||
},
|
||||
getApplicationStructure (app) {
|
||||
return repository.get(`/${resource}/structure/?app=${app}`)
|
||||
},
|
||||
saveApplication (app, data) {
|
||||
return repository.post(`/${resource}/${app}/`, data)
|
||||
return repository.put(`/${resource}/${app}/`, data)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user