only show register if no users, otherwise show only login
This commit is contained in:
parent
daa1323b88
commit
3585ca70e8
6 changed files with 116 additions and 185 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue