From 2148390112019e9baec1527df67a31dad122993e Mon Sep 17 00:00:00 2001 From: Ryan G <78384369+SpongeManiac@users.noreply.github.com> Date: Tue, 13 Jun 2023 16:21:05 -0700 Subject: [PATCH] Fixing More Mistakes I shouldn't have done this --- src/invidious/routes/api/v1/authentication.cr | 2 +- src/invidious/routing.cr | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/invidious/routes/api/v1/authentication.cr b/src/invidious/routes/api/v1/authentication.cr index 56442836..69ad12cb 100644 --- a/src/invidious/routes/api/v1/authentication.cr +++ b/src/invidious/routes/api/v1/authentication.cr @@ -73,7 +73,7 @@ module Invidious::Routes::API::V1::Authentication end else # send captcha - captcha = Invidious::User::Captcha.generate_text(HMAC_KEY, "POST::register") + captcha = Invidious::User::Captcha.generate_text(HMAC_KEY, ":api_register") # Fix token formatting formatted_tokens : Array(JSON::Any) = Array(JSON::Any).new captcha["tokens"].each do |tok| diff --git a/src/invidious/routing.cr b/src/invidious/routing.cr index 4f7d0d5e..70666f89 100644 --- a/src/invidious/routing.cr +++ b/src/invidious/routing.cr @@ -245,9 +245,9 @@ module Invidious::Routing get "/api/v1/hashtag/:hashtag", {{namespace}}::Search, :hashtag # Authentication - post "/api/v1/register", {{namespace}}::Authentication, :api_register - post "/api/v1/login", {{namespace}}::Authentication, :api_login - post "/api/v1/signout", {{namespace}}::Authentication, :api_signout + post "/api/v1/api_register", {{namespace}}::Authentication, :api_register + post "/api/v1/api_login", {{namespace}}::Authentication, :api_login + post "/api/v1/api_signout", {{namespace}}::Authentication, :api_signout # Authenticated