Explorar el Código

getVersion to lean

vian hace 4 años
padre
commit
b5ee07e0ac
Se han modificado 1 ficheros con 1 adiciones y 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 || '';
 }