aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBlake DeMarcy <ofunknowndescent@gmail.com>2017-03-05 18:03:58 -0600
committerBlake DeMarcy <ofunknowndescent@gmail.com>2017-03-05 18:03:58 -0600
commitaf7a67951dd1f6eac8fea4e3344a142c83791b0c (patch)
tree1adb29ac71f7dd74400e6aabfba29274555eed18 /src
parentb77a3a3332aa86f8488421b6bcbe846db1874a52 (diff)
downloadbbj-af7a67951dd1f6eac8fea4e3344a142c83791b0c.tar.gz
formatting changes
Diffstat (limited to 'src')
-rw-r--r--src/schema.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/schema.py b/src/schema.py
index 7f5f545..b0698f4 100644
--- a/src/schema.py
+++ b/src/schema.py
@@ -28,8 +28,12 @@ def error(code, description):
def user_internal(ID, auth_hash, name, quip, bio, admin):
- if not quip: quip = ""
- if not bio: bio = ""
+ if not quip:
+ quip = ""
+
+ if not bio:
+ bio = ""
+
return {
"user_id": ID, # string
"quip": quip, # (possibly empty) string
@@ -41,8 +45,12 @@ def user_internal(ID, auth_hash, name, quip, bio, admin):
def user_external(ID, name, quip, bio, admin):
- if not quip: quip = ""
- if not bio: bio = ""
+ if not quip:
+ quip = ""
+
+ if not bio:
+ bio = ""
+
return {
"user_id": ID, # string
"quip": quip, # (possibly empty) string
@@ -53,9 +61,12 @@ def user_external(ID, name, quip, bio, admin):
def thread(ID, author, body, title, tags):
- if not tags: tags = list()
+ if not tags:
+ tags = list()
+
body = formatting.parse(body, doquotes=False)
now = time()
+
return {
"thread_id": ID, # string
"post_id": 1, # integer
@@ -72,8 +83,10 @@ def thread(ID, author, body, title, tags):
def reply(ID, author, body):
+
body = formatting.parse(body)
now = time()
+
return {
"post_id": ID, # integer
"author": author, # string
Un proyecto texto-plano.xyz