Add endpoint to check open signup
This commit is contained in:
@@ -86,3 +86,9 @@ pub async fn logout() -> Result<()> {
|
|||||||
pub async fn get_user() -> Result<Option<User>> {
|
pub async fn get_user() -> Result<Option<User>> {
|
||||||
Ok(auth.user.clone().map(Into::into))
|
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)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user