Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

505 B
Raw Blame
#[cfg(test)]
mod test;

use axum::{
    Json,
    http::StatusCode,
    response::{IntoResponse, Response},
};
use model::response::ErrorResponse;

const SIGNUP_FORBIDDEN_MESSAGE: &str = "signup is not allowed";

/// Map an expected signup-policy rejection to a generic API response.
pub(crate) fn signup_forbidden_response() -> Response {
    (
        StatusCode::FORBIDDEN,
        Json(ErrorResponse {
            message: SIGNUP_FORBIDDEN_MESSAGE.into(),
        }),
    )
        .into_response()
}