check if account already exists #37

This commit is contained in:
b3yond 2019-01-11 12:15:28 +01:00
parent a529f4eb23
commit 1c8853341a

View file

@ -56,6 +56,9 @@ def register_post():
@get('/confirm/<city>/<token>')
@view('template/propaganda.tpl')
def confirm(city, token):
# check whether city already exists
if db.by_city(city):
return dict(error='Account already exists.')
# create db-entry
if db.confirm(token, city):
# :todo show info "Account creation successful."