feat: Phase 1-3 全部完成 — 沙盒增强、学情分析、学习路径
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Controller, Get, Post, Body, UseGuards, Req } from '@nestjs/common';
|
||||
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
import { OrdersService } from './orders.service';
|
||||
|
||||
@ApiTags('订阅')
|
||||
@Controller('subscriptions')
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@ApiBearerAuth()
|
||||
export class SubscriptionsController {
|
||||
constructor(private ordersService: OrdersService) {}
|
||||
|
||||
@Get('current')
|
||||
async getCurrentSubscription(@Req() req: any) {
|
||||
return this.ordersService.getCurrentSubscription(req.user.userId);
|
||||
}
|
||||
|
||||
@Get()
|
||||
async getSubscriptions(@Req() req: any) {
|
||||
return this.ordersService.getSubscriptions(req.user.userId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user