1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 16:45:16 +00:00

Implement groups visibility system

This commit is contained in:
2019-12-13 18:30:08 +01:00
parent ee6579efa0
commit af9e95a914
6 changed files with 187 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import { RequestHandler } from "../entities/RequestHandler";
import { GroupsHelper } from "../helpers/GroupsHelper";
import { GroupsAccessLevel } from "../entities/Group";
/**
* Groups API controller
@ -18,4 +19,13 @@ export class GroupsController {
h.send(await GroupsHelper.GetListUser(h.getUserId()));
}
/**
* Get information about a single group
*
* @param h Request handler
*/
public static async GetInfoSingle(h: RequestHandler) {
const groupID = await h.postGroupIDWithAccess("id", GroupsAccessLevel.LIMITED_ACCESS);
h.send("Good progress!");
}
}

View File

@ -86,4 +86,6 @@ export const Routes : Route[] = [
// Groups controller
{path: "/groups/get_my_list", cb: (h) => GroupsController.GetListUser(h)},
{path: "/groups/get_info", cb: (h) => GroupsController.GetInfoSingle(h)},
]