feature: localization's first implmentation

This commit is contained in:
2026-06-20 12:37:38 +03:30
parent b314a5fa11
commit 284fbd08aa
46 changed files with 1860 additions and 643 deletions

View File

@@ -9,7 +9,8 @@ import {
Res,
HttpCode,
HttpStatus,
Get
Get,
Patch,
} from '@nestjs/common';
import type { Response } from 'express';
import {
@@ -28,6 +29,7 @@ import { RegisterDto } from './dto/register.dto';
import { CreateOrganizationDto } from './dto/create-organization.dto';
import { JwtAuthGuard } from './guards/jwt-auth.guard';
import { LocalAuthGuard } from './guards/local-auth.guard';
import { UpdateLanguageDto } from './dto/update-language.dto';
@ApiTags('auth')
@Controller('auth')
@@ -149,6 +151,14 @@ export class AuthController {
return this.authService.getProfile(req.user.id);
}
@Patch('profile/language')
@UseGuards(JwtAuthGuard)
@ApiBearerAuth('JWT-auth')
@ApiOperation({ summary: 'Update user language preference' })
async updateLanguage(@Req() req, @Body() dto: UpdateLanguageDto) {
return this.authService.updateLanguage(req.user.id, dto);
}
@Get('subscription-alert')
@UseGuards(JwtAuthGuard)
@ApiBearerAuth('JWT-auth')