Browse Source

getVersion to lean

vian 4 năm trước cách đây
mục cha
commit
b5ee07e0ac
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      modules/system_setting/model/index.js

+ 1 - 1
modules/system_setting/model/index.js

@@ -6,6 +6,6 @@ const mongoose = require('mongoose');
 const sysModel = mongoose.model('system_setting');
 
 async function getVersion() {
-    const data = await sysModel.findOne({}, '-_id version');
+    const data = await sysModel.findOne({}, '-_id version').lean();
     return data && data.version || '';
 }