add get notification route
This commit is contained in:
@@ -12,7 +12,6 @@ import {
|
||||
} from "./notification.schema";
|
||||
import { getUser } from "../user/user.service";
|
||||
import { createNote } from "../note/note.service";
|
||||
import { permitModel } from "../permit/permit.schema";
|
||||
import { createAlert } from "../alert/alert.service";
|
||||
|
||||
export async function createNotification(
|
||||
@@ -31,6 +30,16 @@ export async function createNotification(
|
||||
.populate({ path: "assignedTo", select: "pid name avatar" });
|
||||
}
|
||||
|
||||
export async function getNotification(
|
||||
notifId: string,
|
||||
user: AuthenticatedUser
|
||||
) {
|
||||
return await notificationModel.findOne({
|
||||
tenantId: user.tenantId,
|
||||
pid: notifId,
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateNotification(
|
||||
notifId: string,
|
||||
input: UpdateNotificationInput,
|
||||
|
||||
Reference in New Issue
Block a user