mirror of
https://github.com/Kizuren/uLinkShortener.git
synced 2026-01-03 13:14:19 +01:00
Fixed registration
This commit is contained in:
parent
798d3e888a
commit
3bf3d9a554
1 changed files with 3 additions and 1 deletions
|
|
@ -87,7 +87,9 @@ def register():
|
||||||
account_id = ''.join(random.choices(string.digits, k=8))
|
account_id = ''.join(random.choices(string.digits, k=8))
|
||||||
|
|
||||||
mongo.db.users.insert_one({'account_id': account_id})
|
mongo.db.users.insert_one({'account_id': account_id})
|
||||||
return jsonify({'account_id': account_id})
|
response = make_response(jsonify({'account_id': account_id}))
|
||||||
|
response.set_cookie('account_id', account_id, max_age=31536000)
|
||||||
|
return response
|
||||||
|
|
||||||
@app.route('/login', methods=['POST'])
|
@app.route('/login', methods=['POST'])
|
||||||
def login():
|
def login():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue