|
|
@@ -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 { Public } from 'src/auth/public.decorator'
|
|
|
|
|
|
@@ -33,4 +33,16 @@ export class WeixinController {
|
|
|
public async pay(@Query() { 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')
|
|
|
+ }
|
|
|
}
|