From 418d4f33717950082773850ad11cb00b3683421d Mon Sep 17 00:00:00 2001 From: Bastard Operator Date: Sat, 27 Nov 2021 02:18:09 +0100 Subject: [PATCH] Refactor /signup to /login to be more clear (Actually the signup and login process is the same) --- .../{signup => login}/mastodon/get_client.php | 2 +- public/index.php | 2 +- public/{signup => login}/.htaccess | 0 public/{signup => login}/index.php | 18 +++++++++--------- src/action/oauth/mastodon.php | 2 +- src/js/api.php | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) rename public/api/{signup => login}/mastodon/get_client.php (95%) rename public/{signup => login}/.htaccess (100%) rename public/{signup => login}/index.php (79%) diff --git a/public/api/signup/mastodon/get_client.php b/public/api/login/mastodon/get_client.php similarity index 95% rename from public/api/signup/mastodon/get_client.php rename to public/api/login/mastodon/get_client.php index 7813cf2..77a1144 100644 --- a/public/api/signup/mastodon/get_client.php +++ b/public/api/login/mastodon/get_client.php @@ -9,7 +9,7 @@ if ($instance === false) { $app_name = conf('app_name', 'RealFan'); $site_name = conf('site_name', HOST_DEV); -$redirect_uris = conf('site_name', HOST_DEV).'/signup/mastodon:oauth'; +$redirect_uris = conf('site_name', HOST_DEV).'/login/mastodon:oauth'; $scopes = 'read:accounts write'; # create the Authorization App diff --git a/public/index.php b/public/index.php index 9cbf2d7..1191985 100644 --- a/public/index.php +++ b/public/index.php @@ -20,7 +20,7 @@ $p = [

Real Fan when you want your content creators to get the highest cut.') ?>

- +
diff --git a/public/signup/.htaccess b/public/login/.htaccess similarity index 100% rename from public/signup/.htaccess rename to public/login/.htaccess diff --git a/public/signup/index.php b/public/login/index.php similarity index 79% rename from public/signup/index.php rename to public/login/index.php index b520102..7df85af 100644 --- a/public/signup/index.php +++ b/public/login/index.php @@ -2,7 +2,7 @@
-SIGNUP: +LOGIN:
FUNCTION:
diff --git a/src/action/oauth/mastodon.php b/src/action/oauth/mastodon.php index 44352b1..bf13134 100644 --- a/src/action/oauth/mastodon.php +++ b/src/action/oauth/mastodon.php @@ -3,7 +3,7 @@ $payload_fil = '/tmp/oauth-'.$ID; if (!file_exists($payload_fil)) { - header('Location: /signup'); die; + header('Location: /login'); die; } # get mastodon auth token diff --git a/src/js/api.php b/src/js/api.php index 1285978..c0435b0 100644 --- a/src/js/api.php +++ b/src/js/api.php @@ -20,7 +20,7 @@ const http = { const API = { mastodon: { registerInstance: function(instance) { - http.get('/api/signup/mastodon/get_client.php?instance='+encodeURIComponent(instance), {}, function(data) + http.get('/api/login/mastodon/get_client.php?instance='+encodeURIComponent(instance), {}, function(data) { data = JSON.parse(data); if (data.status === 'err') {