diff --git a/src/api/auth.rs b/src/api/auth.rs index 4f8a006..b18f44a 100644 --- a/src/api/auth.rs +++ b/src/api/auth.rs @@ -17,12 +17,12 @@ use crate::util::error::{AuthError, Contextualize, Error, ErrorType}; #[post("/api/v1/auth/signup", mut auth: Extension, db_pool: Extension, config: Extension)] pub async fn signup(credentials: UserCredentials) -> Result { if !config.auth.open_signup { - return Err(Error::new_here(ErrorType::Auth(AuthError::Unauthorized))); + return Err(Error::message_here("Signup is disabled")); } // Don't allow signup when already logged in if auth.user.is_some() { - return Err(Error::new_here(ErrorType::Auth(AuthError::Unauthorized))); + return Err(Error::message_here("Log out before creating an account")); } let hashed_creds = credentials