Esempio n. 1
0
def add_lose_e(account):
	try:
		result, e = db().add_lose_and_update_score_e(account)
	except:
		result = -1
		e = "Unknown error"
	return {"result": result, "exception": e}
Esempio n. 2
0
def sign_up(account, password, name):
	try:
		result, e = db().add_new_user(account, password, name)
	except:
		result = -1
		e = "Unknown error"
	return {"result": result, "account": account, "name": name, "exception": e}
Esempio n. 3
0
def determine_rival(account, rival):
	rival_list = []
	if '/' in rival:
		rival_list= rival.split('/')
	else:
		rival_list.append(rival)
	result, e = db().determine_rival(account, rival_list)
	return {"rival": result, "exception": e}
Esempio n. 4
0
def get_score(account):
	result = db().get_score(account)
	return result
Esempio n. 5
0
def get_login(account):
	result, e = db().get_password(account)
	return {"password": result, "exception": e}