Download apps/backend/src/api/routes/notifications.controller.ts from Leon4gr45/postio: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/spaces/Leon4gr45/postio/resolve/main/apps/backend/src/api/routes/notifications.controller.ts
- Command line
-
hf download hf://spaces/Leon4gr45/postio/apps/backend/src/api/routes/notifications.controller.ts
-
curl -L -o notifications.controller.ts https://huggingface.co/spaces/Leon4gr45/postio/resolve/main/apps/backend/src/api/routes/notifications.controller.ts
1.08 kB
| import { Controller, Get } from '@nestjs/common'; | |
| import { GetUserFromRequest } from '@gitroom/nestjs-libraries/user/user.from.request'; | |
| import { Organization, User } from '@prisma/client'; | |
| import { GetOrgFromRequest } from '@gitroom/nestjs-libraries/user/org.from.request'; | |
| import { NotificationService } from '@gitroom/nestjs-libraries/database/prisma/notifications/notification.service'; | |
| import { ApiTags } from '@nestjs/swagger'; | |
| ('Notifications') | |
| ('/notifications') | |
| export class NotificationsController { | |
| constructor(private _notificationsService: NotificationService) {} | |
| ('/') | |
| async mainPageList( | |
| () user: User, | |
| () organization: Organization | |
| ) { | |
| return this._notificationsService.getMainPageCount( | |
| organization.id, | |
| user.id | |
| ); | |
| } | |
| ('/list') | |
| async notifications( | |
| () user: User, | |
| () organization: Organization | |
| ) { | |
| return this._notificationsService.getNotifications( | |
| organization.id, | |
| user.id | |
| ); | |
| } | |
| } | |