diff --git a/src/routes/v2/authenticatedSites/notifications.ts b/src/routes/v2/authenticatedSites/notifications.ts index e942fc486..71bcd81e7 100644 --- a/src/routes/v2/authenticatedSites/notifications.ts +++ b/src/routes/v2/authenticatedSites/notifications.ts @@ -1,20 +1,13 @@ import autoBind from "auto-bind" import express from "express" -import validator from "validator" - -import logger from "@logger/logger" - -import { BadRequestError } from "@errors/BadRequestError" import { attachReadRouteHandlerWrapper, attachWriteRouteHandlerWrapper, } from "@middleware/routeHandler" -import UserSessionData from "@classes/UserSessionData" - import UserWithSiteSessionData from "@root/classes/UserWithSiteSessionData" -import { isError, RequestHandler } from "@root/types" +import { RequestHandler } from "@root/types" import NotificationsService from "@services/identity/NotificationsService" interface NotificationsRouterProps { diff --git a/src/services/identity/NotificationsService.ts b/src/services/identity/NotificationsService.ts index c901bdd61..b51f6695d 100644 --- a/src/services/identity/NotificationsService.ts +++ b/src/services/identity/NotificationsService.ts @@ -1,4 +1,4 @@ -import { ModelStatic, Op, Sequelize } from "sequelize" +import { ModelStatic, Op } from "sequelize" import { Notification, Site, Repo, SiteMember } from "@database/models" import { @@ -12,7 +12,6 @@ const NUM_RECENT_NOTIFICATIONS = 6 interface NotificationsServiceProps { repository: ModelStatic - site: ModelStatic siteMember: ModelStatic } @@ -21,13 +20,10 @@ class NotificationsService { // that the types are synced. private readonly repository: NotificationsServiceProps["repository"] - private readonly site: NotificationsServiceProps["site"] - private readonly siteMember: NotificationsServiceProps["siteMember"] - constructor({ repository, site, siteMember }: NotificationsServiceProps) { + constructor({ repository, siteMember }: NotificationsServiceProps) { this.repository = repository - this.site = site this.siteMember = siteMember } diff --git a/src/services/identity/index.ts b/src/services/identity/index.ts index 25cc95ede..b120a6700 100644 --- a/src/services/identity/index.ts +++ b/src/services/identity/index.ts @@ -80,6 +80,5 @@ export const isomerAdminsService = new IsomerAdminsService({ export const notificationsService = new NotificationsService({ repository: Notification, - site: Site, siteMember: SiteMember, })