Skip to content

Commit

Permalink
feat: add IncidentLogService, AlertLogService, and ScheduledMaintenan…
Browse files Browse the repository at this point in the history
…ceLogService to BaseAPI
  • Loading branch information
simlarsen committed Jan 12, 2025
1 parent 408d06e commit a755853
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions App/FeatureSet/BaseAPI/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,22 @@ import ScheduledMaintenanceTemplateOwnerUserService, {
} from "Common/Server/Services/ScheduledMaintenanceTemplateOwnerUserService";
import TableView from "Common/Models/DatabaseModels/TableView";

import IncidentLog from "Common/Models/DatabaseModels/IncidentLog";
import AlertLog from "Common/Models/DatabaseModels/AlertLog";
import ScheduledMaintenanceLog from "Common/Models/DatabaseModels/ScheduledMaintenanceLog";

import IncidentLogService, {
Service as IncidentLogServiceType,
} from "Common/Server/Services/IncidentLogService";

import AlertLogService, {
Service as AlertLogServiceType,
} from "Common/Server/Services/AlertLogService";

import ScheduledMaintenanceLogService, {
Service as ScheduledMaintenanceLogServiceType,
} from "Common/Server/Services/ScheduledMaintenanceLogService";

const BaseAPIFeatureSet: FeatureSet = {
init: async (): Promise<void> => {
const app: ExpressApplication = Express.getExpressApp();
Expand Down Expand Up @@ -526,6 +542,21 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter(),
);

app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<IncidentLog, IncidentLogServiceType>(IncidentLog, IncidentLogService).getRouter(),
)

app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<AlertLog, AlertLogServiceType>(AlertLog, AlertLogService).getRouter(),
)

app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<ScheduledMaintenanceLog, ScheduledMaintenanceLogServiceType>(ScheduledMaintenanceLog, ScheduledMaintenanceLogService).getRouter(),
)

app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<AlertNoteTemplate, AlertNoteTemplateServiceType>(
Expand Down

0 comments on commit a755853

Please sign in to comment.