feat(xo-server/rest-api): add groups collection

See https://xcp-ng.org/forum/post/70500
This commit is contained in:
Julien Fontanet 2024-02-08 11:05:59 +01:00
parent a6e93c895c
commit bcdcfbf20b
2 changed files with 11 additions and 1 deletions

View File

@ -7,6 +7,8 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [REST API] Add `/groups` collection [Forum#70500](https://xcp-ng.org/forum/post/70500)
### Bug fixes
> Users must be able to say: “I had this issue, happy to know it's fixed”
@ -31,7 +33,7 @@
<!--packages-start-->
- xo-server patch
- xo-server minor
- xo-server-load-balancer patch
- xo-web patch

View File

@ -319,6 +319,14 @@ export default class RestApi {
}
collections.backup = {}
collections.groups = {
getObject(id) {
return app.getGroup(id)
},
async getObjects(filter, limit) {
return handleArray(await app.getAllGroups(), filter, limit)
},
}
collections.restore = {}
collections.tasks = {}
collections.users = {