@@ -17,7 +17,7 @@ class TenantService extends CrudService {
* @property _tenant 分站名
*/
async getTenant({ _tenant }) {
- const res = await this.model.find({ _tenant });
+ const res = await this.model.findOne({ _tenant });
return res;
}
@@ -7,6 +7,16 @@ module.exports = () => {
level: 'INFO',
consoleLevel: 'INFO',
};
-
+ config.dbName = 'shitang';
+ config.mongoose = {
+ url: `mongodb://localhost:27017/${config.dbName}`,
+ options: {
+ user: 'admin',
+ pass: 'admin',
+ authSource: 'admin',
+ useNewUrlParser: true,
+ useCreateIndex: true,
+ },
+ };
return config;