43 lines
No EOL
499 B
Markdown
43 lines
No EOL
499 B
Markdown
# Startup
|
|
|
|
if config file present:
|
|
|
|
- load config file
|
|
- connect to DB
|
|
- mount all routers
|
|
|
|
else:
|
|
|
|
- mount admin router
|
|
|
|
# PUT admin/config
|
|
|
|
if config file present:
|
|
|
|
- if user is admin:
|
|
- overwrite config
|
|
- reload config, reconnect to DB
|
|
|
|
else:
|
|
|
|
- overwrite config
|
|
- reload config, connect to DB
|
|
- mount all routers
|
|
|
|
# POST admin/user
|
|
|
|
if no config file present:
|
|
|
|
- error
|
|
|
|
elif user table is empty:
|
|
|
|
- create new user
|
|
- give "admin" cap to new user
|
|
|
|
else:
|
|
|
|
- if user is admin:
|
|
- create new user
|
|
|
|
... |