mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-11-04 11:34:04 +00:00 
			
		
		
		
	Ready to implement comments creation
This commit is contained in:
		@@ -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)},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user