From ed34281a9be34357454c6be99d0cda926590d981 Mon Sep 17 00:00:00 2001 From: Blake DeMarcy Date: Wed, 1 Mar 2017 11:01:07 -0600 Subject: [PATCH] avatar -> quip --- src/db.py | 6 +++--- src/endpoints.py | 4 ++-- src/schema.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/db.py b/src/db.py index e9b1ee5..a7a1b37 100644 --- a/src/db.py +++ b/src/db.py @@ -86,12 +86,12 @@ def user_resolve(name_or_id): return False -def user_register(auth_hash, name, avatar, bio): +def user_register(auth_hash, name, quip, bio): if USERDB["mapname"].get(name): return schema.error(4, "Username taken.") ID = uuid1().hex - scheme = schema.user_internal(ID, auth_hash, name, avatar, bio, False) + scheme = schema.user_internal(ID, auth_hash, name, quip, bio, False) USERDB.update({ID: scheme}) USERDB["mapname"].update({name: ID}) user_dbdump(USERDB) @@ -101,7 +101,7 @@ def user_register(auth_hash, name, avatar, bio): def user_get(ID): user = USERDB[ID] return schema.user_external( - ID, user["name"], user["avatar"], + ID, user["name"], user["quip"], user["bio"], user["admin"]) diff --git a/src/endpoints.py b/src/endpoints.py index 03235b0..c433899 100644 --- a/src/endpoints.py +++ b/src/endpoints.py @@ -9,7 +9,7 @@ endpoints = { "thread_index": [], "thread_create": ["title", "body", "tags"], "thread_reply": ["thread_id", "body"], - "user_register": ["user", "auth_hash", "avatar", "bio"], + "user_register": ["user", "auth_hash", "quip", "bio"], "user_get": ["target_user"], } @@ -43,7 +43,7 @@ def user_register(json): db.user_register( json["auth_hash"], json["user"], - json["avatar"], + json["quip"], json["bio"])) diff --git a/src/schema.py b/src/schema.py index 233ff22..ea8801c 100644 --- a/src/schema.py +++ b/src/schema.py @@ -26,10 +26,10 @@ def error(code, description): return result -def user_internal(ID, auth_hash, name, avatar, bio, admin): +def user_internal(ID, auth_hash, name, quip, bio, admin): return { "user_id": ID, - "avatar": avatar, + "quip": quip, "name": name, "bio": bio, "admin": admin, @@ -37,10 +37,10 @@ def user_internal(ID, auth_hash, name, avatar, bio, admin): } -def user_external(ID, name, avatar, bio, admin): +def user_external(ID, name, quip, bio, admin): return { "user_id": ID, - "avatar": avatar, + "quip": quip, "name": name, "bio": bio, "admin": admin