feat: realistic face avatar + voice input + ASR endpoint
This commit is contained in:
@@ -31,13 +31,10 @@ export class ResumeController {
|
||||
@Post(':id/download')
|
||||
async download(@Param('id') id: string, @CurrentUser('userId') userId: string, @Res() res: Response) {
|
||||
const resume = await this.resumeService.getDetail(id, userId)
|
||||
|
||||
const canDownload = await this.quotaService.checkDownload(userId, resume)
|
||||
if (!canDownload) {
|
||||
const canDownload = await this.quotaService.checkAndDeductDownload(userId, resume.paidDownload)
|
||||
if (!canDownload && !resume.paidDownload) {
|
||||
throw new HttpException('请先付费下载', HttpStatus.PAYMENT_REQUIRED)
|
||||
}
|
||||
|
||||
await this.quotaService.deductDownload(userId, resume)
|
||||
if (!resume.paidDownload) {
|
||||
await this.resumeService.markPaid(id, userId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user