Skip to content

Commit 2096c7e

Browse files
authored
removing notification system (#147)
1 parent 02e12fe commit 2096c7e

File tree

13 files changed

+0
-919
lines changed

13 files changed

+0
-919
lines changed

apps/api-gateway/src/api/api.controller.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -134,27 +134,6 @@ export class ApiController {
134134
);
135135
}
136136

137-
// Special handling for notification SSE endpoints
138-
@Get("notifications/stream")
139-
@UseGuards(DynamicJwtCookieAuthGuard)
140-
@ApiOperation({ summary: "Stream notifications" })
141-
async handleNotificationStream(
142-
@Req() request: UserSessionRequest,
143-
@Res() response: Response,
144-
) {
145-
const { endpoint, extraHeaders } = this.apiService.getForwardingDetails(
146-
DownstreamService.MARK_API,
147-
request,
148-
);
149-
150-
// Forward as SSE
151-
await this.apiService.forwardSSERequest(
152-
request,
153-
response,
154-
endpoint,
155-
extraHeaders,
156-
);
157-
}
158137
@All("/*")
159138
@UseGuards(DynamicJwtCookieAuthGuard)
160139
@ApiOperation({ summary: "Handle API requests for the Mark API" })

apps/api/src/api/api.module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { JobModule } from "./Job/job.module";
1212
import { LlmModule } from "./llm/llm.module";
1313
import { ReportsModule } from "./report/report.module";
1414
import { ChatModule } from "./user/modules/chat.module";
15-
import { NotificationsModule } from "./user/modules/notification.module";
1615

1716
@Module({
1817
controllers: [ApiController],
@@ -28,7 +27,6 @@ import { NotificationsModule } from "./user/modules/notification.module";
2827
JobModule,
2928
ReportsModule,
3029
ChatModule,
31-
NotificationsModule,
3230
FilesModule,
3331
],
3432
})

apps/api/src/api/report/report.module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { AdminAuthModule } from "src/auth/admin-auth.module";
55
import { PrismaService } from "src/prisma.service";
66
import { FilesService } from "../files/services/files.service";
77
import { S3Service } from "../files/services/s3.service";
8-
import { NotificationsService } from "../user/services/notification.service";
98
import { ReportsController } from "./controllers/report.controller";
109
import { FloService } from "./services/flo.service";
1110
import { ReportsService } from "./services/report.service";
@@ -14,7 +13,6 @@ import { ReportsService } from "./services/report.service";
1413
providers: [
1514
ReportsService,
1615
FloService,
17-
NotificationsService,
1816
PrismaService,
1917
FilesService,
2018
S3Service,

apps/api/src/api/report/services/report.service.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import axios from "axios";
1313
import * as jwt from "jsonwebtoken";
1414
import * as natural from "natural";
1515
import { FilesService } from "src/api/files/services/files.service";
16-
import { NotificationsService } from "src/api/user/services/notification.service";
1716
import {
1817
UserRole,
1918
UserSession,
@@ -53,21 +52,17 @@ export class ReportsService {
5352
private readonly floService: FloService,
5453
private readonly prisma: PrismaService,
5554
private readonly filesService: FilesService,
56-
private readonly notificationsService: NotificationsService,
5755
private readonly adminEmailService: AdminEmailService,
5856
) {}
5957
private getPrivateKey(): string {
6058
const raw = process.env.GITHUB_APP_PRIVATE_KEY || "";
6159

62-
// Handle different possible formats
6360
let processed = raw.trim();
6461

65-
// If the key contains literal \n strings, convert them to actual newlines
6662
if (processed.includes("\\n")) {
6763
processed = processed.replaceAll("\\n", "\n");
6864
}
6965

70-
// Ensure proper PEM format
7166
if (!processed.startsWith("-----BEGIN")) {
7267
throw new InternalServerErrorException(
7368
"Invalid private key format: missing BEGIN marker",
@@ -2316,23 +2311,6 @@ A new related issue has been created: #${issue.number}
23162311
? " (Not Reproducible/Invalid)"
23172312
: ""
23182313
: "";
2319-
2320-
await this.notificationsService.createNotification(
2321-
report.reporterId,
2322-
"ISSUE_STATUS_CHANGE",
2323-
`Issue #${
2324-
report.issueNumber || reportId
2325-
} Status: ${statusText}${reasonText}`,
2326-
statusMessage || this.getDefaultStatusMessage(newStatus),
2327-
{
2328-
reportId,
2329-
oldStatus: report.status,
2330-
newStatus,
2331-
issueNumber: report.issueNumber,
2332-
statusMessage,
2333-
closureReason,
2334-
},
2335-
);
23362314
}
23372315
/**
23382316
* Track issue status changes and notify users

apps/api/src/api/user/controllers/notification.controller.ts

Lines changed: 0 additions & 97 deletions
This file was deleted.

apps/api/src/api/user/modules/notification.module.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

apps/api/src/api/user/services/notification.service.ts

Lines changed: 0 additions & 126 deletions
This file was deleted.

apps/api/src/app.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export class AppModule implements NestModule {
4545
{ path: "/v1/user-session", method: RequestMethod.GET },
4646
{ path: "/v1/reports*", method: RequestMethod.ALL },
4747
{ path: "/v1/chats*", method: RequestMethod.ALL },
48-
{ path: "/v1/notifications*", method: RequestMethod.ALL },
4948
{ path: "/v1/files*", method: RequestMethod.ALL },
5049
{ path: "/v1/admin*", method: RequestMethod.ALL },
5150
{ path: "/v2/assignments/*", method: RequestMethod.ALL },

0 commit comments

Comments
 (0)