Compare commits
2 Commits
e7899b780d
...
c926a468fb
Author | SHA1 | Date | |
---|---|---|---|
c926a468fb | |||
067ac5181b |
8
geneit_app/package-lock.json
generated
8
geneit_app/package-lock.json
generated
@ -46,7 +46,7 @@
|
||||
"eslint": "^9.25.1",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"globals": "^16.0.0",
|
||||
"globals": "^16.2.0",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.24.1",
|
||||
"vite": "^6.2.3"
|
||||
@ -3319,9 +3319,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/globals": {
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz",
|
||||
"integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==",
|
||||
"version": "16.2.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz",
|
||||
"integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
|
@ -48,7 +48,7 @@
|
||||
"eslint": "^9.25.1",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"globals": "^16.0.0",
|
||||
"globals": "^16.2.0",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.24.1",
|
||||
"vite": "^6.2.3"
|
||||
|
@ -10,7 +10,6 @@ use crate::utils::string_utils::rand_str;
|
||||
use crate::utils::time_utils::time;
|
||||
use bcrypt::DEFAULT_COST;
|
||||
use diesel::prelude::*;
|
||||
use std::io::ErrorKind;
|
||||
|
||||
/// Get the information of a user, by its id
|
||||
pub async fn get_by_id(id: UserID) -> anyhow::Result<User> {
|
||||
@ -25,8 +24,7 @@ pub async fn get_by_mail(mail: &str) -> anyhow::Result<User> {
|
||||
/// Get the information of a user, by its password reset token
|
||||
pub async fn get_by_pwd_reset_token(token: &str) -> anyhow::Result<User> {
|
||||
if token.is_empty() {
|
||||
return Err(anyhow::Error::from(std::io::Error::new(
|
||||
ErrorKind::Other,
|
||||
return Err(anyhow::Error::from(std::io::Error::other(
|
||||
"Token is empty!",
|
||||
)));
|
||||
}
|
||||
@ -46,8 +44,7 @@ pub async fn get_by_pwd_reset_token(token: &str) -> anyhow::Result<User> {
|
||||
/// Get the information of a user, by its account deletion token
|
||||
pub async fn get_by_account_delete_token(token: &str) -> anyhow::Result<User> {
|
||||
if token.is_empty() {
|
||||
return Err(anyhow::Error::from(std::io::Error::new(
|
||||
ErrorKind::Other,
|
||||
return Err(anyhow::Error::from(std::io::Error::other(
|
||||
"Token is empty!",
|
||||
)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user