xiongzhu 3 years ago
parent
commit
917f1b8fde
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/membership/membership.controller.ts

+ 4 - 4
src/membership/membership.controller.ts

@@ -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()
         }
     }