Explorar o código

getVersion to lean

vian %!s(int64=4) %!d(string=hai) anos
pai
achega
b5ee07e0ac
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 || '';
 }