1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 08:35:17 +00:00

Ready to return advanced info

This commit is contained in:
2019-12-24 19:10:45 +01:00
parent e85bdf8e54
commit 0925b44492
4 changed files with 26 additions and 2 deletions

View File

@ -115,6 +115,19 @@ export class GroupsController {
h.send(result);
}
/**
* Get advanced information about a group
*
* @param h Request handler
*/
public static async GetAdvancedInfo(h: RequestHandler) {
const groupID = await h.postGroupIDWithAccess("id", GroupsAccessLevel.VIEW_ACCESS);
const group = await GroupsHelper.GetInfo(groupID);
h.send(await this.GroupInfoToAPI(group, h));
}
/**
* Turn a GroupInfo object into a valid API object
*

View File

@ -92,4 +92,6 @@ export const Routes : Route[] = [
{path: "/groups/get_info", cb: (h) => GroupsController.GetInfoSingle(h)},
{path: "/groups/get_multiple_info", cb: (h) => GroupsController.GetInfoMultiple(h)},
{path: "/groups/get_advanced_info", cb: (h) => GroupsController.GetAdvancedInfo(h)},
]