diff --git a/src/controllers/CommentsController.ts b/src/controllers/CommentsController.ts index cc84b70..e59f7ae 100644 --- a/src/controllers/CommentsController.ts +++ b/src/controllers/CommentsController.ts @@ -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 diff --git a/src/controllers/Routes.ts b/src/controllers/Routes.ts index 14c5900..d53288e 100644 --- a/src/controllers/Routes.ts +++ b/src/controllers/Routes.ts @@ -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)},