Skip to content

Commit

Permalink
Fix: instantiate the DAO earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
yamikuronue committed Aug 24, 2016
1 parent 406b1d6 commit f95d44a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mafiabot.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ exports.internals = internals;
exports.activate = function activate() {
debug('activating mafiabot');
const plugConfig = internals.configuration;

dao = new MafiaDao(plugConfig.db);

modController = new MafiaModController(dao, plugConfig);
playerController = new MafiaPlayerController(dao, plugConfig);

Expand Down Expand Up @@ -107,6 +106,7 @@ exports.plugin = function plugin(forum, config) {
});
internals.configuration = config;
internals.forum = forum;
dao = new MafiaDao(config.db);

return {
activate: exports.activate,
Expand Down

0 comments on commit f95d44a

Please sign in to comment.