feat(pos): add update password functionality with DTO and service method

This commit is contained in:
2026-05-24 10:44:47 +03:30
parent 6f65123816
commit b53b7d3ed3
3 changed files with 43 additions and 1 deletions
+11 -1
View File
@@ -1,12 +1,13 @@
import { PosInfo } from '@/common/decorators/posInfo.decorator'
import { TokenAccount } from '@/common/decorators/tokenInfo.decorator'
import { Controller, Get, Res } from '@nestjs/common'
import { Body, Controller, Get, Put, Res } from '@nestjs/common'
import { ApiTags } from '@nestjs/swagger'
import type {
PosServiceGetAccessibleResponseDto,
PosServiceGetInfoResponseDto,
PosServiceGetMeResponseDto,
} from './dto/pos-response.dto'
import { UpdatePosAccountPasswordDto } from './dto/update-password-request.dto'
import { PosService } from './pos.service'
@ApiTags('Pos')
@@ -48,4 +49,13 @@ export class PosController {
): Promise<PosServiceGetMeResponseDto> {
return await this.service.getMe(account_id, pos_id)
}
@Put('update-password')
async updatePassword(
@TokenAccount('userId') consumerId: string,
@TokenAccount('account_id') accountId: string,
@Body() data: UpdatePosAccountPasswordDto,
) {
return this.service.updatePassword(consumerId, accountId, data)
}
}