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