mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-11-04 03:24:04 +00:00 
			
		
		
		
	Ready to implement likes update
This commit is contained in:
		
							
								
								
									
										19
									
								
								src/controllers/LikesController.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								src/controllers/LikesController.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					import { RequestHandler } from "../entities/RequestHandler";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Likes controller
 | 
				
			||||||
 | 
					 * 
 | 
				
			||||||
 | 
					 * @author Pierre HUBERT
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export class LikesController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Update like status over an element
 | 
				
			||||||
 | 
						 * 
 | 
				
			||||||
 | 
						 * @param h Request handler
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						public static async Update(h: RequestHandler) {
 | 
				
			||||||
 | 
							// TODO : implement
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -13,6 +13,7 @@ import { FriendsController } from "./FriendsController";
 | 
				
			|||||||
import { MoviesController } from "./MoviesController";
 | 
					import { MoviesController } from "./MoviesController";
 | 
				
			||||||
import { PostsController } from "./PostsController";
 | 
					import { PostsController } from "./PostsController";
 | 
				
			||||||
import { CommentsController } from "./CommentsController";
 | 
					import { CommentsController } from "./CommentsController";
 | 
				
			||||||
 | 
					import { LikesController } from "./LikesController";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Controllers routes
 | 
					 * Controllers routes
 | 
				
			||||||
@@ -214,6 +215,10 @@ export const Routes : Route[] = [
 | 
				
			|||||||
	{path: "/comments/delete", cb: (h) => CommentsController.Delete(h)},
 | 
						{path: "/comments/delete", cb: (h) => CommentsController.Delete(h)},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Likes controller
 | 
				
			||||||
 | 
						{path: "/likes/update", cb: (h) => LikesController.Update(h)},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Notifications controller
 | 
						// Notifications controller
 | 
				
			||||||
	{path: "/notifications/count_unread", cb: (h) => NotificationsController.CountUnread(h)},
 | 
						{path: "/notifications/count_unread", cb: (h) => NotificationsController.CountUnread(h)},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user