diff --git a/src/controllers/PostsController.ts b/src/controllers/PostsController.ts index 48acae9..d522389 100644 --- a/src/controllers/PostsController.ts +++ b/src/controllers/PostsController.ts @@ -19,6 +19,8 @@ import { statSync } from "fs"; import { lookup } from "mime-types"; import { NewSurvey } from "../entities/NewSurvey"; import { FriendsHelper } from "../helpers/FriendsHelper"; +import { NotificationsUtils } from "../utils/NotificationsUtils"; +import { NotifEventType } from "../entities/Notification"; /** * Posts controller @@ -291,7 +293,9 @@ export class PostsController { } - // TODO : create a notification + // Create a notification + await NotificationsUtils.CreatePostNotification( + h.getUserId(), postID, NotifEventType.ELEM_CREATED); h.send({ success: "The post has been created!",