Add endpoint to check open signup

This commit is contained in:
2026-07-08 20:47:58 -04:00
parent e7c43e7a47
commit 8348277a87

View File

@@ -86,3 +86,9 @@ pub async fn logout() -> Result<()> {
pub async fn get_user() -> Result<Option<User>> {
Ok(auth.user.clone().map(Into::into))
}
/// Check if open signup is enabled
#[get("/api/v1/auth/open-signup", config: Extension<Config>)]
pub async fn open_signup() -> Result<bool> {
Ok(config.auth.open_signup)
}