liuyu 5 rokov pred
rodič
commit
c5fc7928c6
1 zmenil súbory, kde vykonal 5 pridanie a 4 odobranie
  1. 5 4
      app/controller/user.js

+ 5 - 4
app/controller/user.js

@@ -35,10 +35,11 @@ class UserController extends Controller {
 
   async gensign() {
     const api = new TLSSigAPIv2.Api(this.app.config.sdkappid, this.app.config.secretkey);
-    let sig = api.genSig(this.ctx.request.body.userid, 86400 * 180);
-    console.log('sig ' + sig);
-    sig = api.genSigWithUserbuf(this.ctx.request.body.userid, 86400 * 180, this.ctx.request.body.name);
-    console.log('sig with userbuf ' + sig);
+    const res = api.genSig(this.ctx.request.body.userid, 86400 * 180);
+    console.log('sig ' + res);
+    // sig = api.genSigWithUserbuf(this.ctx.request.body.userid, 86400 * 180, this.ctx.request.body.name);
+    // console.log('sig with userbuf ' + sig);
+    this.ctx.ok({ data: res });
   }
 
 }