add: create user api
This commit is contained in:
parent
6dff656583
commit
cda879f6df
11 changed files with 187 additions and 25 deletions
|
@ -12,6 +12,8 @@ pub enum Error {
|
|||
RegistrationDisabled,
|
||||
DatabaseError,
|
||||
IncorrectPassword,
|
||||
AlreadyAuthenticated,
|
||||
Unknown,
|
||||
}
|
||||
|
||||
impl ToString for Error {
|
||||
|
@ -21,6 +23,7 @@ impl ToString for Error {
|
|||
Error::UserNotFound => "Unable to find user with given parameters".to_string(),
|
||||
Error::RegistrationDisabled => "Registration is disabled".to_string(),
|
||||
Error::IncorrectPassword => "The given password is invalid".to_string(),
|
||||
Error::AlreadyAuthenticated => "Already authenticated".to_string(),
|
||||
_ => format!("An unknown error as occurred ({:?})", self),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue