only show register if no users, otherwise show only login

This commit is contained in:
Wavering Ana 2025-01-29 20:47:04 -05:00
parent daa1323b88
commit 3585ca70e8
6 changed files with 116 additions and 185 deletions

View file

@ -72,6 +72,10 @@ async fn main() -> Result<()> {
)
.route("/auth/register", web::post().to(handlers::register))
.route("/auth/login", web::post().to(handlers::login))
.route(
"/auth/check-first-user",
web::get().to(handlers::check_first_user),
)
.route("/health", web::get().to(handlers::health_check)),
)
.service(web::resource("/{short_code}").route(web::get().to(handlers::redirect_to_url)))