feat: 🎸 Add managed groups create CRUD operation

This commit is contained in:
Carlos Alcaide Corvo committed 2021-11-10 07:54:49 -08:00
1 parent 2f1feab9d3
commit deb9847617
10 files changed
+120 -3

No files matched your search

+13
View File
@@ -523,6 +523,19 @@ export default function () {
);
this.get('/managed-groups/:id');
this.del('/managed-groups/:id');
this.post(
'/managed-groups/:idMethod',
function ({ managedGroups }, { params: { idMethod } }) {
const attrs = this.normalizedRequestAttrs();
const id = idMethod.split(':')[0];
const managedGroup = managedGroups.find(id);
const updatedAttrs = {
version: attrs.version,
attributes: managedGroup.attributes,
};
return managedGroup.update(updatedAttrs);
}
);
/* Uncomment the following line and the Response import above
* Then change the response code to simulate error responses.