aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlake DeMarcy <ofunknowndescent@gmail.com>2017-04-03 03:52:51 -0500
committerBlake DeMarcy <ofunknowndescent@gmail.com>2017-04-03 03:52:51 -0500
commit3861893f9c11e7ad8fbee668a4f39a4bef32b814 (patch)
treefabd08d31f7cde635ce772d429dc72b3ab7a83cb
parent4b428f026de36257f853a56dc72776a3228213ed (diff)
downloadbbj-3861893f9c11e7ad8fbee668a4f39a4bef32b814.tar.gz
formatting
-rw-r--r--server.py2
-rwxr-xr-xsetup.sh3
-rw-r--r--src/schema.py2
3 files changed, 4 insertions, 3 deletions
diff --git a/server.py b/server.py
index e9817c9..1308e4d 100644
--- a/server.py
+++ b/server.py
@@ -35,7 +35,7 @@ def api_method(function):
body = json.loads(body)
if isinstance(body, dict):
# 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")
auth = cherrypy.request.headers.get("Auth")
diff --git a/setup.sh b/setup.sh
index 5f83919..241efb1 100755
--- a/setup.sh
+++ b/setup.sh
@@ -20,6 +20,7 @@ EOF
--dbset )
sqlite3 data.sqlite < schema.sql
echo cleared
+ chmod 400 data.sqlite
exit;;
esac
@@ -30,4 +31,4 @@ echo Using $PYTHON...
$PYTHON -m pip install ${DEPS[*]}
echo "Enter [i] to initialize a new database"
read CLEAR
-[[ $CLEAR == "i" ]] && sqlite3 bbj.db < schema.sql
+[[ $CLEAR == "i" ]] && sqlite3 bbj.db < schema.sql; chmod 400 data.sqlite
diff --git a/src/schema.py b/src/schema.py
index 85de132..f2aadfb 100644
--- a/src/schema.py
+++ b/src/schema.py
@@ -19,7 +19,7 @@ If "error" is true, it looks like this:
"error": {
"code": an integer from 0 to 5,
"description": a string describing the error in detail.
-}
+ }
"data": null // ALWAYS null if error is not false
"usermap": {} // ALWAYS empty if error is not false
}
Un proyecto texto-plano.xyz