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:
@ -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
|
||||
*
|
||||
|
@ -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)},
|
||||
]
|
Reference in New Issue
Block a user