farsi messages

This commit is contained in:
2025-12-22 19:12:03 +03:30
parent ed251611c4
commit 1802b05e74
14 changed files with 365 additions and 230 deletions
@@ -9,6 +9,7 @@ import { RestId } from '../../../common/decorators/rest-id.decorator';
import { UpdatePreferenceDto } from '../dto/update-preference.dto';
import { AdminId } from 'src/common/decorators/admin-id.decorator';
import { API_HEADER_SLUG } from 'src/common/constants/index';
import { NotificationMessage } from 'src/common/enums/message.enum';
@ApiTags('notifications')
@Controller()
@@ -64,7 +65,7 @@ export class NotificationsController {
@ApiParam({ name: 'id', description: 'Notification ID' })
async readNotificationUser(@RestId() restaurantId: string, @Param('id') id: string, @UserId() userId: string) {
await this.notificationService.readNotificationAsUser(id, userId, restaurantId);
return { message: 'Notification read successfully' };
return { message: NotificationMessage.READ_SUCCESS };
}
@UseGuards(AuthGuard)
@@ -73,7 +74,7 @@ export class NotificationsController {
@ApiOperation({ summary: 'Read all notification ' })
async readAllNotificationUser(@RestId() restaurantId: string, @UserId() userId: string) {
await this.notificationService.readAllNotifsAsUser(userId, restaurantId);
return { message: 'Notification read successfully' };
return { message: NotificationMessage.READ_SUCCESS };
}
/* ***************** Admin Endpoints ***************** */
@@ -116,7 +117,7 @@ export class NotificationsController {
@ApiParam({ name: 'id', description: 'Notification ID' })
async readNotificationAdmin(@RestId() restaurantId: string, @AdminId() adminId: string, @Param('id') id: string) {
await this.notificationService.readNotificationAdmin(id, adminId, restaurantId);
return { message: 'Notification read successfully' };
return { message: NotificationMessage.READ_SUCCESS };
}
@UseGuards(AdminAuthGuard)
@@ -125,7 +126,7 @@ export class NotificationsController {
@ApiOperation({ summary: 'Read all notification ' })
async readAllNotificationAdmin(@RestId() restaurantId: string, @AdminId() adminId: string, @Param('id') id: string) {
await this.notificationService.readAllNotifsAsAdmin(adminId, restaurantId);
return { message: 'Notification read successfully' };
return { message: NotificationMessage.READ_SUCCESS };
}
@UseGuards(AdminAuthGuard)