Spaces:
Sleeping
Sleeping
Bibhu Mishra
Claude Sonnet 4.6
Add GitHub Actions CI/CD, HF Space deployment, market hours guard, and static serving
abc493d Download api/src/notifications/notifications.controller.ts from mishrabp/stockadvisor: direct link, hf CLI and curl.
- Browser
- Download file 881 Bytes
-
https://huggingface.co/spaces/mishrabp/stockadvisor/resolve/main/api/src/notifications/notifications.controller.ts
- Command line
-
hf download hf://spaces/mishrabp/stockadvisor/api/src/notifications/notifications.controller.ts
-
curl -L -o notifications.controller.ts https://huggingface.co/spaces/mishrabp/stockadvisor/resolve/main/api/src/notifications/notifications.controller.ts
881 Bytes
| import { Controller, Get, Param, Patch, Request, UseGuards } from '@nestjs/common'; | |
| import { JwtAuthGuard } from '../auth/jwt-auth.guard'; | |
| import { NotificationsService } from './notifications.service'; | |
| ('notifications') | |
| (JwtAuthGuard) | |
| export class NotificationsController { | |
| constructor(private svc: NotificationsService) {} | |
| () | |
| findAll(() req: { user: { id: number } }) { | |
| return this.svc.findForUser(req.user.id); | |
| } | |
| ('unread-count') | |
| unreadCount(() req: { user: { id: number } }) { | |
| return this.svc.unreadCount(req.user.id); | |
| } | |
| (':id/read') | |
| markRead(('id') id: string, () req: { user: { id: number } }) { | |
| return this.svc.markRead(+id, req.user.id); | |
| } | |
| ('read-all') | |
| markAllRead(() req: { user: { id: number } }) { | |
| return this.svc.markAllRead(req.user.id); | |
| } | |
| } | |