feat: StorageService S3/MinIO, POST /users, invoice upload, portal dashboard §08 statuses + notifications
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
Post,
|
||||
Body,
|
||||
Param,
|
||||
Query,
|
||||
UseGuards,
|
||||
Request,
|
||||
} from "@nestjs/common";
|
||||
@@ -44,3 +45,15 @@ export class NotificationsController {
|
||||
return this.svc.seedDefaultTemplates(req.user.tenantId);
|
||||
}
|
||||
}
|
||||
|
||||
/** GET /notifications — bandeja de entrada del usuario */
|
||||
@Controller("notifications")
|
||||
@UseGuards(JwtAuthGuard)
|
||||
export class NotificationsUserController {
|
||||
constructor(private readonly svc: NotificationsService) {}
|
||||
|
||||
@Get()
|
||||
list(@Request() req: any, @Query("limit") limit?: string) {
|
||||
return this.svc.findByUser(req.user.id, limit ? Number(limit) : 20);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Module } from "@nestjs/common";
|
||||
import { NotificationsService } from "./notifications.service";
|
||||
import { NotificationsController } from "./notifications.controller";
|
||||
import { NotificationsController, NotificationsUserController } from "./notifications.controller";
|
||||
import { PrismaModule } from "../prisma/prisma.module";
|
||||
import { IntegrationsModule } from "../integrations/integrations.module";
|
||||
|
||||
@Module({
|
||||
imports: [PrismaModule, IntegrationsModule],
|
||||
controllers: [NotificationsController],
|
||||
controllers: [NotificationsController, NotificationsUserController],
|
||||
providers: [NotificationsService],
|
||||
exports: [NotificationsService],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user