mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 07:39:16 +02:00
More secure tokens
This commit is contained in:
parent
f2e5969c44
commit
30f6a77e68
2 changed files with 4 additions and 5 deletions
|
@ -93,7 +93,7 @@ class ApplicationViewSet(
|
|||
app = self.get_object()
|
||||
if not app.user_id or request.user != app.user:
|
||||
return response.Response(status=404)
|
||||
app.token = models.get_token(15)
|
||||
app.token = models.get_token()
|
||||
app.save(update_fields=["token"])
|
||||
serializer = serializers.CreateApplicationSerializer(app)
|
||||
return response.Response(serializer.data, status=200)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue