mirror of
https://github.com/Kizuren/uLinkShortener.git
synced 2025-12-21 21:16:17 +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))
|
||||
|
||||
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'])
|
||||
def login():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue