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

Can check the right to access a comment

This commit is contained in:
2020-03-21 11:49:52 +01:00
parent aa0c9f4f6a
commit 16ac9fae15
4 changed files with 78 additions and 0 deletions

View File

@ -50,6 +50,17 @@ export class CommentsController {
h.send({success: true, commentID: commentID});
}
/**
* Get information about a single comment
*
* @param h Request handler
*/
public static async GetSingle(h: RequestHandler) {
const commentID = h.postCommentIDWithAccess("commentID");
console.log("Comment ID: " + commentID);
}
/**
* Get the content of a comment included in a POST field
*

View File

@ -207,6 +207,8 @@ export const Routes : Route[] = [
// Comments controller
{path: "/comments/create", cb: (h) => CommentsController.Create(h)},
{path: "/comments/get_single", cb: (h) => CommentsController.GetSingle(h)},
// Notifications controller
{path: "/notifications/count_unread", cb: (h) => NotificationsController.CountUnread(h)},