Function backend::routes::user::user_sign_up [−][src]
pub async fn user_sign_up(
db: Connection<PgDb>,
kvdb: Connection<RedisDb>,
user_info: Json<UserInfo<'_>>
) -> (Status, Result<Json<UserResponse>, Json<ErrorResponse>>)Expand description
User Sign-up
Sign up a user.
Parameters
Connection<PgDb>: Postgres connectionConnection<RedisDb>: Redis connectionJson<UserInfo>: Json of UserInfo, including username, password, email, verification code
Returns
Status: HTTP statusJson<UserResponse>: Json of UserResponse, including burrow_id of user’s assigned default burrow
Errors
ErrorResponse: Error messageErrorCode::EmailInvalidErrorCode::EmailDuplicateErrorCode::EmptyFieldErrorCode::UsernameDuplicateErrorCode::CredentialInvalidErrorCode::DatabaseErr