reloaded 5 سال پیش
والد
کامیت
08875e40fa
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      app/controller/comment.js
  2. 1 1
      app/service/comment.js

+ 1 - 1
app/controller/comment.js

@@ -12,7 +12,7 @@ class CommentController extends Controller {
     this.service = this.ctx.service.comment;
   }
 
-  async query() {
+  async show() {
     const res = await this.service.query(this.ctx.query);
     this.ctx.ok({ ...res });
   }

+ 1 - 1
app/service/comment.js

@@ -17,7 +17,7 @@ class CommentService extends CrudService {
     const total = await (await this.model.find(info)).length;
     const comments = await this.model.find(info).skip(Number(skip)).limit(Number(limit));
     for (const comment of comments) {
-      const url = "http://127.0.0.1:9999/api/auth/user/" + comment.uid;
+      const url = 'http://127.0.0.1:9999/api/auth/user/' + comment.uid;
       const user = await this.ctx.curl(url, {
         method: 'get',
         headers: {