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