fix(user-service): add /wallet/balance alias endpoint
Flutter wallet_provider.dart calls /api/v1/wallet/balance but the controller only had GET /wallet (root). Adding /wallet/balance alias. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6f70d7a2c2
commit
56cf021cc8
|
|
@ -12,12 +12,21 @@ export class WalletController {
|
|||
@Get()
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Get wallet balance' })
|
||||
@ApiOperation({ summary: 'Get wallet' })
|
||||
async getWallet(@Req() req: any) {
|
||||
const wallet = await this.walletService.getWallet(req.user.id);
|
||||
return { code: 0, data: wallet };
|
||||
}
|
||||
|
||||
@Get('balance')
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Get wallet balance (alias)' })
|
||||
async getWalletBalance(@Req() req: any) {
|
||||
const wallet = await this.walletService.getWallet(req.user.id);
|
||||
return { code: 0, data: wallet };
|
||||
}
|
||||
|
||||
@Post('deposit')
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@ApiBearerAuth()
|
||||
|
|
|
|||
Loading…
Reference in New Issue