Update authentication.cr

This commit is contained in:
Ryan G 2023-06-12 21:15:05 -07:00
parent d62ff8f347
commit 5d22ca51c9

View File

@ -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 = {{namespace}}::Login.from_json(env.request.body || "{}")
creds = Invidious::Routes::API::V1::Authentication::Login.from_json(env.request.body || "{}")
user = Invidious::Database::Users.select(email: creds.username)
old_sid = creds.token
if user