From 0e89b9bb113cb5fada1a24442cecc9fd082488c1 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Sat, 14 Sep 2024 20:38:03 -0400 Subject: [PATCH] include token in `/api/v1/login` response --- relay/database/connection.py | 2 +- relay/views/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/database/connection.py b/relay/database/connection.py index c061d3b..14ff60a 100644 --- a/relay/database/connection.py +++ b/relay/database/connection.py @@ -142,7 +142,7 @@ class Connection(SqlConnection): # todo: check if software is different than stored row - def put_inbox(self, + def put_inbox(self, # noqa: E301 domain: str, inbox: str | None = None, actor: str | None = None, diff --git a/relay/views/api.py b/relay/views/api.py index 960e9f1..428aa63 100644 --- a/relay/views/api.py +++ b/relay/views/api.py @@ -213,7 +213,7 @@ class Login(View): app = conn.put_app_login(user) - resp = Response.new(app.get_api_data(), ctype = 'json') + resp = Response.new(app.get_api_data(True), ctype = 'json') resp.set_cookie( 'user-token', app.token, # type: ignore[arg-type]