mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 05:19:22 +00:00
Ready to implement comments creation
This commit is contained in:
parent
d362c0faab
commit
932ae20403
@ -10,6 +10,17 @@ import { LikesHelper, LikesType } from "../helpers/LikesHelper";
|
||||
|
||||
export class CommentsController {
|
||||
|
||||
/**
|
||||
* Create a new comment
|
||||
*
|
||||
* @param h Request handler
|
||||
*/
|
||||
public static async Create(h: RequestHandler) {
|
||||
const postID = await h.postPostIDWithAccess("postID");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Turn a list of comment object into API entries
|
||||
|
@ -12,6 +12,7 @@ import { CallsController } from "./CallsController";
|
||||
import { FriendsController } from "./FriendsController";
|
||||
import { MoviesController } from "./MoviesController";
|
||||
import { PostsController } from "./PostsController";
|
||||
import { CommentsController } from "./CommentsController";
|
||||
|
||||
/**
|
||||
* Controllers routes
|
||||
@ -203,6 +204,9 @@ export const Routes : Route[] = [
|
||||
{path: "/posts/getAvailableTargets", cb: (h) => PostsController.GetTargets(h)},
|
||||
|
||||
|
||||
// Comments controller
|
||||
{path: "/comments/create", cb: (h) => CommentsController.Create(h)},
|
||||
|
||||
|
||||
// Notifications controller
|
||||
{path: "/notifications/count_unread", cb: (h) => NotificationsController.CountUnread(h)},
|
||||
|
Loading…
Reference in New Issue
Block a user