Ver código fonte

delete & restore方法指定async

dygapp 6 anos atrás
pai
commit
f9d675cb9c
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      app/service/news.js

+ 4 - 4
app/service/news.js

@@ -78,12 +78,12 @@ class NewsService extends CrudService {
     return await doc.save();
   }
 
-  delete({ id }) {
-    return this.status({ id, state: 1 });
+  async delete({ id }) {
+    return await this.status({ id, state: 1 });
   }
 
-  restore({ id }) {
-    return this.status({ id, state: 0 });
+  async restore({ id }) {
+    return await this.status({ id, state: 0 });
   }
 }