From 5cbdffd4cd36da3a66e8553efcd36923beb81939 Mon Sep 17 00:00:00 2001 From: Ryan G <78384369+SpongeManiac@users.noreply.github.com> Date: Mon, 12 Jun 2023 21:17:04 -0700 Subject: [PATCH] Update authentication.cr --- src/invidious/routes/api/v1/authentication.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious/routes/api/v1/authentication.cr b/src/invidious/routes/api/v1/authentication.cr index 6668189f..feed7135 100644 --- a/src/invidious/routes/api/v1/authentication.cr +++ b/src/invidious/routes/api/v1/authentication.cr @@ -92,7 +92,7 @@ module Invidious::Routes::API::V1::Authentication if !CONFIG.login_enabled return error_json(400, "Login has been disabled by administrator") else - creds = Invidious::Routes::API::V1::Authentication::Login.from_json(env.request.body || "{}") + creds = CredentialsLogin.from_json(env.request.body || "{}") user = Invidious::Database::Users.select(email: creds.username) old_sid = creds.token if user @@ -149,7 +149,7 @@ struct Credentials property password : String end -struct Login +struct CredentialsLogin include JSON::Serializable include YAML::Serializable