fix the bug from minjun' testing

This commit is contained in:
Sukchan Lee 2017-09-22 21:38:38 +09:00
parent d7e9814bee
commit c7fb169cb3
4 changed files with 9 additions and 6 deletions

View File

@ -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' ];

View File

@ -12,6 +12,7 @@ const schema = {
"type": "string",
"title": "Username*",
"required": true,
"maxLength": 24
},
"roles": {
"type" : "array",

View File

@ -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>

View File

@ -12,6 +12,7 @@ const schema = {
"type": "string",
"title": "Title*",
"required": true,
"maxLength": 24
},
"security": {
"title": "",