import { Body, Controller, Get, Post, Req } from '@nestjs/common'
import { UserBalanceService } from './user-balance.service'
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'

@ApiTags('userBalance')
@ApiBearerAuth()
@Controller('/userBalance')
export class UserBalanceController {
    constructor(private readonly userBalanceService: UserBalanceService) {}

    @Get('/get')
    async getBalance(@Req() req) {
        return await this.userBalanceService.getBalance(req.user.id)
    }

    @Get('/records/get')
    async getRecords(@Req() req) {
        return await this.userBalanceService.getRecords(req.user.id)
    }
}
