feat: implement create captcha for sqlx postgres

This commit is contained in:
realaravinth
2022-05-12 11:52:53 +05:30
parent 00dca4a069
commit d64b05c84f
3 changed files with 30 additions and 1 deletions

View File

@@ -33,6 +33,8 @@ pub fn map_register_err(e: Error) -> DBError {
DBError::EmailTaken
} else if msg.contains("mcaptcha_users_secret_key") {
DBError::SecretTaken
} else if msg.contains("mcaptcha_config_key_key") {
DBError::CaptchaKeyTaken
} else {
DBError::DBError(Box::new(Error::Database(err)))
}