mirror of
https://github.com/open5gs/open5gs.git
synced 2026-04-28 03:19:31 +00:00
fix the bug from minjun' testing
This commit is contained in:
parent
d7e9814bee
commit
c7fb169cb3
4 changed files with 9 additions and 6 deletions
|
|
@ -34,13 +34,13 @@ co(function* () {
|
|||
}
|
||||
const db = yield mongoose.connect(process.env.DB_URI)
|
||||
|
||||
// FIXME : we need to implement landing page for inserting admin account
|
||||
Account.findByUsername('admin', true, (err, account) => {
|
||||
Account.count((err, count) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
}
|
||||
if (!account) {
|
||||
|
||||
if (!count) {
|
||||
const newAccount = new Account();
|
||||
newAccount.username = 'admin';
|
||||
newAccount.roles = [ 'admin' ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue