mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-23 18:11:40 +00:00
Can delete an emoji
This commit is contained in:
@ -119,6 +119,8 @@ export const Routes : Route[] = [
|
||||
|
||||
{path: "/settings/upload_custom_emoji", cb: (h) => SettingsController.UploadCustomEmoji(h)},
|
||||
|
||||
{path: "/settings/delete_custom_emoji", cb: (h) => SettingsController.DeleteCustomEmoji(h)},
|
||||
|
||||
|
||||
// Friends controller
|
||||
{path: "/friends/getList", cb: (h) => FriendsController.GetList(h)},
|
||||
|
@ -286,6 +286,19 @@ export class SettingsController {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a custom emoji of the user
|
||||
*
|
||||
* @param h Request handler
|
||||
*/
|
||||
public static async DeleteCustomEmoji(h: RequestHandler) {
|
||||
const emoji = await h.postEmojiID("emojiID");
|
||||
|
||||
await CustomEmojisHelper.Delete(emoji);
|
||||
|
||||
h.success()
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an emoji into an API entry
|
||||
*
|
||||
|
Reference in New Issue
Block a user