|
|
@@ -16,13 +16,13 @@ export class MembershipController {
|
|
|
|
|
|
@Post('/renew')
|
|
|
async renewMembership(@Req() req, @Body() body: RenewDto) {
|
|
|
- if (!body.openid) {
|
|
|
- throw new BadRequestException('openid is required')
|
|
|
- }
|
|
|
if (body.type === 'JSAPI') {
|
|
|
+ if (!body.openid) {
|
|
|
+ throw new BadRequestException('openid is required')
|
|
|
+ }
|
|
|
return await this.membershipService.combinedJsapi(req.user.id, body.planId, body.openid)
|
|
|
} else {
|
|
|
- new NotImplementedException()
|
|
|
+ throw new NotImplementedException()
|
|
|
}
|
|
|
}
|
|
|
|