mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
fix api auth endpoint checking wrong user field
This commit is contained in:
parent
73a3e6aad0
commit
1a03db2b1d
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ def get_api_token(request, auth_data: PasswordAuthSchema):
|
||||||
|
|
||||||
if user:
|
if user:
|
||||||
# TODO: support multiple tokens in the future, for now we just have one per user
|
# TODO: support multiple tokens in the future, for now we just have one per user
|
||||||
api_token, created = APIToken.objects.get_or_create(user=user)
|
api_token, created = APIToken.objects.get_or_create(created_by_id=user.pk)
|
||||||
|
|
||||||
return api_token.__json__()
|
return api_token.__json__()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue