1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-25 23:09:22 +00:00

Ready to implement comments creation

This commit is contained in:
Pierre HUBERT 2020-03-21 09:20:34 +01:00
parent d362c0faab
commit 932ae20403
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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)},