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

Start delete group method

This commit is contained in:
2019-12-27 18:49:40 +01:00
parent 2222873d69
commit 820b861ef8
4 changed files with 49 additions and 0 deletions

View File

@ -552,6 +552,20 @@ export class GroupsController {
h.success("Follow status has been successfully updated!");
}
/**
* Delete a group
*
* @param h Request handler
*/
public static async DeleteGroup(h: RequestHandler) {
const groupID = await h.postGroupIDWithAccess("groupID", GroupsAccessLevel.ADMIN_ACCESS);
await h.needUserPostPassword("password");
// TODO : implement method
h.error(500, "Method not implemented yet!");
}
/**
* Turn a GroupInfo object into a valid API object
*

View File

@ -128,4 +128,6 @@ export const Routes : Route[] = [
{path: "/groups/remove_membership", cb: (h) => GroupsController.RemoveMembership(h)},
{path: "/groups/set_following", cb: (h) => GroupsController.SetFollowing(h)},
{path: "/groups/delete", cb: (h) => GroupsController.DeleteGroup(h)},
]