Browse Source

delete & restore方法指定async

dygapp 6 years ago
parent
commit
f9d675cb9c
1 changed files with 4 additions and 4 deletions
  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 });
   }
 }