forked from acouzens/open5gs
fix the bug from minjun' testing
This commit is contained in:
parent
d7e9814bee
commit
c7fb169cb3
|
@ -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' ];
|
||||
|
|
|
@ -12,6 +12,7 @@ const schema = {
|
|||
"type": "string",
|
||||
"title": "Username*",
|
||||
"required": true,
|
||||
"maxLength": 24
|
||||
},
|
||||
"roles": {
|
||||
"type" : "array",
|
||||
|
|
|
@ -4,8 +4,9 @@ import styled from 'styled-components';
|
|||
import { media, transitions } from 'helpers/style-utils';
|
||||
import oc from 'open-color';
|
||||
|
||||
import SubscriberIcon from 'react-icons/lib/md/person-add'
|
||||
import ProfileIcon from 'react-icons/lib/md/folder-shared';
|
||||
import SubscriberIcon from 'react-icons/lib/md/person-add';
|
||||
import ProfileIcon from 'react-icons/lib/md/content-copy';
|
||||
import AccountIcon from 'react-icons/lib/md/vpn-key';
|
||||
|
||||
const Menu = styled.div`
|
||||
display: block;
|
||||
|
@ -89,7 +90,7 @@ const Sidebar = ({ isOpen, width, selectedView, onSelectView }) => (
|
|||
<Title>Profile</Title>
|
||||
</Item>
|
||||
<Item name="account" selected={selectedView} onSelect={onSelectView}>
|
||||
<Icon><ProfileIcon/></Icon>
|
||||
<Icon><AccountIcon/></Icon>
|
||||
<Title>Account</Title>
|
||||
</Item>
|
||||
</Menu>
|
||||
|
|
|
@ -12,6 +12,7 @@ const schema = {
|
|||
"type": "string",
|
||||
"title": "Title*",
|
||||
"required": true,
|
||||
"maxLength": 24
|
||||
},
|
||||
"security": {
|
||||
"title": "",
|
||||
|
|
Loading…
Reference in New Issue