From fe1b5f8be0e2f93fb7042a2a3110a8447a536874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Z=C3=B6ller?= Date: Wed, 3 Dec 2025 17:41:41 +0100 Subject: [PATCH] Remove registration page and redirect home to timeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the registration UI page completely and use the public timeline as the default start page. Changes: - Delete auth/register.html template - Remove /register route from AuthViewController - Update HomeController to redirect / to /timeline - Remove /register from public paths list in auth.js Users will no longer see a registration option in the UI. Registration can only be done via direct API calls if enabled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../fitpub/controller/AuthViewController.java | 5 - .../fitpub/controller/HomeController.java | 2 +- src/main/resources/static/js/auth.js | 2 +- .../resources/templates/auth/register.html | 290 ------------------ 4 files changed, 2 insertions(+), 297 deletions(-) delete mode 100644 src/main/resources/templates/auth/register.html diff --git a/src/main/java/org/operaton/fitpub/controller/AuthViewController.java b/src/main/java/org/operaton/fitpub/controller/AuthViewController.java index 53b1130..70f822f 100644 --- a/src/main/java/org/operaton/fitpub/controller/AuthViewController.java +++ b/src/main/java/org/operaton/fitpub/controller/AuthViewController.java @@ -15,11 +15,6 @@ public class AuthViewController { return "auth/login"; } - @GetMapping("/register") - public String register() { - return "auth/register"; - } - @PostMapping("/logout") public String logout() { // Logout is handled client-side (removing JWT token) diff --git a/src/main/java/org/operaton/fitpub/controller/HomeController.java b/src/main/java/org/operaton/fitpub/controller/HomeController.java index 8978a22..5b9e6e5 100644 --- a/src/main/java/org/operaton/fitpub/controller/HomeController.java +++ b/src/main/java/org/operaton/fitpub/controller/HomeController.java @@ -11,6 +11,6 @@ public class HomeController { @GetMapping("/") public String home() { - return "index"; + return "redirect:/timeline"; } } diff --git a/src/main/resources/static/js/auth.js b/src/main/resources/static/js/auth.js index 1636277..09da907 100644 --- a/src/main/resources/static/js/auth.js +++ b/src/main/resources/static/js/auth.js @@ -267,7 +267,7 @@ const FitPubAuth = { */ checkAuthStatus: function() { const currentPath = window.location.pathname; - const publicPaths = ['/', '/login', '/register', '/timeline']; + const publicPaths = ['/', '/login', '/timeline']; // Skip check for public paths if (publicPaths.includes(currentPath)) { diff --git a/src/main/resources/templates/auth/register.html b/src/main/resources/templates/auth/register.html deleted file mode 100644 index 20954dc..0000000 --- a/src/main/resources/templates/auth/register.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - Register - - - -
-
-
-
-
-

- - Create Account -

- -

- Join the federated fitness community -

- - -
- - - - - - - -
- - -
- 3-30 characters. Letters, numbers, and underscores only. -
-
- Please provide a valid username. -
-
- - -
- - -
- Please provide a valid email address. -
-
- - -
- - -
- This is how your name will appear to others. -
-
- - -
- - -
- At least 8 characters. -
-
- Password must be at least 8 characters. -
-
- - -
- - -
- Passwords do not match. -
-
- - -
- -
-
- - -
-

- Already have an account? - Sign in -

-
-
-
- - -
-
-
About FitPub
-

- FitPub is a federated fitness tracking platform. Your account can interact with - users on Mastodon, Pleroma, and other ActivityPub-compatible platforms. -

-
-
-
-
-
- - - - - - -