mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-12-26 13:38:52 +00:00
Send a notification when a post is created
This commit is contained in:
parent
75b47cedcb
commit
f569e9163d
@ -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!",
|
||||
|
Loading…
Reference in New Issue
Block a user