avatar -> quip

pull/4/head
Blake DeMarcy 2017-03-01 11:01:07 -06:00
parent d23c98e5e7
commit ed34281a9b
3 changed files with 9 additions and 9 deletions

View File

@ -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"])

View File

@ -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"]))

View File

@ -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