Explorar o código

更改返回数据格式

liuyu %!s(int64=5) %!d(string=hai) anos
pai
achega
e79088d7c5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/controller/uploadquestion.js

+ 1 - 1
app/controller/uploadquestion.js

@@ -16,7 +16,7 @@ class UploadquestionController extends Controller {
   // 完成度查询
   async completion() {
     const res = await this.service.completion(this.ctx.query);
-    this.ctx.ok({ ...res });
+    this.ctx.ok({ data: res });
   }
 
 }