check if account already exists #37

master
b3yond 2019-01-11 12:15:28 +01:00
parent e86a7ea612
commit 7cd0dc845a
1 changed files with 3 additions and 0 deletions

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."