Fix FRE-5402: Add missing @shieldai/removebrokers dependency and fix compilation blockers
- Add @shieldai/removebrokers workspace dependency to API package.json - Fix misleading error message: 'Admin access required' -> 'Support access required' - Export RemovalRequest, InfoBroker, BrokerListing types from @shieldai/db - Export RemovalStatus, RemovalMethod, BrokerCategory enums from @shieldai/db - Fix BrokerAlertPipeline: correlationPipeline -> correlationService.ingestGenericAlert - Add @shieldai/correlation dependency to removebrokers package - Fix removalUrl null vs undefined type mismatch in RemoveBrokersService - Fix shared-billing package.json typo: @shieldsai -> @shieldai for shared-notifications
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify';
|
||||
import { prisma } from '@shieldai/db';
|
||||
import { RemovalStatus, Severity, AlertCategory, EntityTypes } from '@shieldai/types';
|
||||
import type { RemovalStatus as PrismaRemovalStatus } from '@shieldai/db';
|
||||
import {
|
||||
removeBrokersService,
|
||||
removeBrokersScheduler,
|
||||
@@ -313,7 +314,7 @@ export async function removebrokersRoutes(fastify: FastifyInstance) {
|
||||
|
||||
await prisma.removalRequest.update({
|
||||
where: { id },
|
||||
data: { status: RemovalStatus.CANCELLED },
|
||||
data: { status: RemovalStatus.CANCELLED as PrismaRemovalStatus },
|
||||
});
|
||||
|
||||
return reply.send({
|
||||
@@ -336,7 +337,7 @@ export async function removebrokersRoutes(fastify: FastifyInstance) {
|
||||
}
|
||||
|
||||
if (authReq.user.role !== 'support') {
|
||||
return reply.code(403).send({ error: 'Admin access required' });
|
||||
return reply.code(403).send({ error: 'Support access required' });
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user