formatting
parent
4b428f026d
commit
3861893f9c
|
@ -35,7 +35,7 @@ def api_method(function):
|
||||||
body = json.loads(body)
|
body = json.loads(body)
|
||||||
if isinstance(body, dict):
|
if isinstance(body, dict):
|
||||||
# lowercase all of its top-level keys
|
# lowercase all of its top-level keys
|
||||||
body = {str(key).lower(): value for key, value in body.items()}
|
body = {key.lower(): value for key, value in body.items()}
|
||||||
|
|
||||||
username = cherrypy.request.headers.get("User")
|
username = cherrypy.request.headers.get("User")
|
||||||
auth = cherrypy.request.headers.get("Auth")
|
auth = cherrypy.request.headers.get("Auth")
|
||||||
|
|
3
setup.sh
3
setup.sh
|
@ -20,6 +20,7 @@ EOF
|
||||||
--dbset )
|
--dbset )
|
||||||
sqlite3 data.sqlite < schema.sql
|
sqlite3 data.sqlite < schema.sql
|
||||||
echo cleared
|
echo cleared
|
||||||
|
chmod 400 data.sqlite
|
||||||
exit;;
|
exit;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -30,4 +31,4 @@ echo Using $PYTHON...
|
||||||
$PYTHON -m pip install ${DEPS[*]}
|
$PYTHON -m pip install ${DEPS[*]}
|
||||||
echo "Enter [i] to initialize a new database"
|
echo "Enter [i] to initialize a new database"
|
||||||
read CLEAR
|
read CLEAR
|
||||||
[[ $CLEAR == "i" ]] && sqlite3 bbj.db < schema.sql
|
[[ $CLEAR == "i" ]] && sqlite3 bbj.db < schema.sql; chmod 400 data.sqlite
|
||||||
|
|
Loading…
Reference in New Issue