1
This commit is contained in:
parent
32b3751834
commit
41ee0a085e
8
server/admin/be/metadata/GameDb2006.js
Normal file
8
server/admin/be/metadata/GameDb2006.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
const utils = require('j7/utils');
|
||||||
|
const basewrap = require('./basewrap');
|
||||||
|
|
||||||
|
class GameDb2006 extends basewrap.BaseWrap {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = GameDb2006;
|
@ -79,10 +79,16 @@ function init() {
|
|||||||
'',
|
'',
|
||||||
'Config'
|
'Config'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
registerMetaClass(configDir + 'gamedb.json',
|
||||||
|
'',
|
||||||
|
'GameDb2006'
|
||||||
|
);
|
||||||
|
|
||||||
load();
|
load();
|
||||||
{
|
{
|
||||||
traverseMetaList('MarketDb', (dbConf, idx) => {
|
traverseMetaList('GameDb2006', (dbConf, idx) => {
|
||||||
app.registerDb('MarketDb' + idx, dbConf);
|
app.registerDb('GameDb2006' + idx, dbConf);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,24 +123,6 @@ function traverseMetaList(name, cb) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContracts() {
|
|
||||||
return getMetaList('Contract');
|
|
||||||
}
|
|
||||||
|
|
||||||
function getContractByName(name) {
|
|
||||||
return getMetaByKey('Contract', name);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getContractByAddress(address) {
|
|
||||||
let contract = null;
|
|
||||||
getContracts().forEach((item) => {
|
|
||||||
if (item['address'] == address) {
|
|
||||||
contract = item;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return contract;
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.init = init;
|
exports.init = init;
|
||||||
|
|
||||||
exports.getMetaByKey = getMetaByKey;
|
exports.getMetaByKey = getMetaByKey;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user