code cleanup
This commit is contained in:
@@ -10,7 +10,6 @@ import { ChangeEvent, dbEvents } from "../realtime";
|
|||||||
import { permitPipeline } from "../utils/pipeline";
|
import { permitPipeline } from "../utils/pipeline";
|
||||||
import { AuthenticatedUser } from "../auth";
|
import { AuthenticatedUser } from "../auth";
|
||||||
import mongoose from "mongoose";
|
import mongoose from "mongoose";
|
||||||
import { noteModel } from "../note/note.schema";
|
|
||||||
import { getUser } from "../user/user.service";
|
import { getUser } from "../user/user.service";
|
||||||
import { createNote } from "../note/note.service";
|
import { createNote } from "../note/note.service";
|
||||||
import { createAlert } from "../alert/alert.service";
|
import { createAlert } from "../alert/alert.service";
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ export async function realTimeRoutes(fastify: FastifyInstance) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
dbEvents.on("alert", (event: AlertEvent, requiredClaims: Claim[]) => {
|
dbEvents.on("alert", (event: AlertEvent, requiredClaims: Claim[]) => {
|
||||||
console.log(event);
|
|
||||||
|
|
||||||
if (hasValidClaims(req.user, requiredClaims)) {
|
if (hasValidClaims(req.user, requiredClaims)) {
|
||||||
let alertFlag = false;
|
let alertFlag = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user