浏览代码

some updates: +socket about new chat, not message, lastmodified and group permissions

asmer@controller 4 年之前
父节点
当前提交
0fb4834bf3
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      models.js

+ 2 - 4
models.js

@@ -131,7 +131,7 @@ module.exports = async (dbName='graphql-chat') => {
                 let result =  await super.save(...params)
 
                 await this.chat
-                this.chat.lastModified = this.createdAt
+                this.chat.lastModified = this.createdAt.toISOString()
                 await this.chat.save()
 
 
@@ -208,9 +208,7 @@ module.exports = async (dbName='graphql-chat') => {
 
 
 
-        return {models: {
-                            SlicedSavable, ...SlicedSavable.classes
-                        }, 
+        return {models: { SlicedSavable, ...SlicedSavable.classes }, 
                 thisUser}
     }