check if account already exists #37
This commit is contained in:
parent
a529f4eb23
commit
1c8853341a
|
@ -56,6 +56,9 @@ def register_post():
|
||||||
@get('/confirm/<city>/<token>')
|
@get('/confirm/<city>/<token>')
|
||||||
@view('template/propaganda.tpl')
|
@view('template/propaganda.tpl')
|
||||||
def confirm(city, token):
|
def confirm(city, token):
|
||||||
|
# check whether city already exists
|
||||||
|
if db.by_city(city):
|
||||||
|
return dict(error='Account already exists.')
|
||||||
# create db-entry
|
# create db-entry
|
||||||
if db.confirm(token, city):
|
if db.confirm(token, city):
|
||||||
# :todo show info "Account creation successful."
|
# :todo show info "Account creation successful."
|
||||||
|
|
Loading…
Reference in a new issue