x1ongzhu 2 ani în urmă
părinte
comite
9699756ac1
1 a modificat fișierele cu 13 adăugiri și 1 ștergeri
  1. 13 1
      src/weixin/weixin.controller.ts

+ 13 - 1
src/weixin/weixin.controller.ts

@@ -1,4 +1,4 @@
-import { Controller, Get, Param, Query } from '@nestjs/common'
+import { Body, Controller, Get, Logger, Param, Post, Query } from '@nestjs/common'
 import { WeixinService } from './weixin.service'
 import { WeixinService } from './weixin.service'
 import { Public } from 'src/auth/public.decorator'
 import { Public } from 'src/auth/public.decorator'
 
 
@@ -33,4 +33,16 @@ export class WeixinController {
     public async pay(@Query() { openid }) {
     public async pay(@Query() { openid }) {
         return await this.weixinService.pay(openid)
         return await this.weixinService.pay(openid)
     }
     }
+
+    @Public()
+    @Get('/jsapiSign')
+    public async jsapiSign(@Query() { url }) {
+        return await this.weixinService.jsapiSign(url)
+    }
+
+    @Public()
+    @Post('/notify')
+    public async notify(@Body() body) {
+        Logger.log(body, 'weixin notify')
+    }
 }
 }