add notification create route, update permit update rotue
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
import { getFilterObject, getSortObject, PageQueryParams } from "../pagination";
|
||||
import { generateId } from "../utils/id";
|
||||
import {
|
||||
CreateNotificationInput,
|
||||
notificationFields,
|
||||
notificationModel,
|
||||
UpdateNotificationInput,
|
||||
} from "./notification.schema";
|
||||
|
||||
export async function createNotification(
|
||||
input: CreateNotificationInput,
|
||||
tenantId: string
|
||||
) {
|
||||
return await notificationModel.create({
|
||||
...input,
|
||||
pid: generateId(),
|
||||
tenantId: tenantId,
|
||||
createdAt: new Date(),
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateNotification(
|
||||
notifId: string,
|
||||
input: UpdateNotificationInput,
|
||||
|
||||
Reference in New Issue
Block a user