From aa21a2a5e614124006fde777011b7989b3460c4b Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 21 Mar 2020 12:07:52 +0100 Subject: [PATCH] Ready to implement likes update --- src/controllers/LikesController.ts | 19 +++++++++++++++++++ src/controllers/Routes.ts | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 src/controllers/LikesController.ts diff --git a/src/controllers/LikesController.ts b/src/controllers/LikesController.ts new file mode 100644 index 0000000..d2967ff --- /dev/null +++ b/src/controllers/LikesController.ts @@ -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 + } + +} \ No newline at end of file diff --git a/src/controllers/Routes.ts b/src/controllers/Routes.ts index 727015a..8449ac6 100644 --- a/src/controllers/Routes.ts +++ b/src/controllers/Routes.ts @@ -13,6 +13,7 @@ import { FriendsController } from "./FriendsController"; import { MoviesController } from "./MoviesController"; import { PostsController } from "./PostsController"; import { CommentsController } from "./CommentsController"; +import { LikesController } from "./LikesController"; /** * Controllers routes @@ -214,6 +215,10 @@ export const Routes : Route[] = [ {path: "/comments/delete", cb: (h) => CommentsController.Delete(h)}, + // Likes controller + {path: "/likes/update", cb: (h) => LikesController.Update(h)}, + + // Notifications controller {path: "/notifications/count_unread", cb: (h) => NotificationsController.CountUnread(h)},