2 Commits

Author SHA1 Message Date
c926a468fb Update dependency globals to ^16.2.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-06-07 00:20:39 +00:00
067ac5181b Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing
2025-06-06 06:03:38 +00:00
3 changed files with 7 additions and 10 deletions

View File

@ -46,7 +46,7 @@
"eslint": "^9.25.1", "eslint": "^9.25.1",
"eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20", "eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.0.0", "globals": "^16.2.0",
"typescript": "^5.8.3", "typescript": "^5.8.3",
"typescript-eslint": "^8.24.1", "typescript-eslint": "^8.24.1",
"vite": "^6.2.3" "vite": "^6.2.3"
@ -3319,9 +3319,9 @@
} }
}, },
"node_modules/globals": { "node_modules/globals": {
"version": "16.0.0", "version": "16.2.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", "resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz",
"integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", "integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {

View File

@ -48,7 +48,7 @@
"eslint": "^9.25.1", "eslint": "^9.25.1",
"eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20", "eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.0.0", "globals": "^16.2.0",
"typescript": "^5.8.3", "typescript": "^5.8.3",
"typescript-eslint": "^8.24.1", "typescript-eslint": "^8.24.1",
"vite": "^6.2.3" "vite": "^6.2.3"

View File

@ -10,7 +10,6 @@ use crate::utils::string_utils::rand_str;
use crate::utils::time_utils::time; use crate::utils::time_utils::time;
use bcrypt::DEFAULT_COST; use bcrypt::DEFAULT_COST;
use diesel::prelude::*; use diesel::prelude::*;
use std::io::ErrorKind;
/// Get the information of a user, by its id /// Get the information of a user, by its id
pub async fn get_by_id(id: UserID) -> anyhow::Result<User> { 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 /// Get the information of a user, by its password reset token
pub async fn get_by_pwd_reset_token(token: &str) -> anyhow::Result<User> { pub async fn get_by_pwd_reset_token(token: &str) -> anyhow::Result<User> {
if token.is_empty() { if token.is_empty() {
return Err(anyhow::Error::from(std::io::Error::new( return Err(anyhow::Error::from(std::io::Error::other(
ErrorKind::Other,
"Token is empty!", "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 /// Get the information of a user, by its account deletion token
pub async fn get_by_account_delete_token(token: &str) -> anyhow::Result<User> { pub async fn get_by_account_delete_token(token: &str) -> anyhow::Result<User> {
if token.is_empty() { if token.is_empty() {
return Err(anyhow::Error::from(std::io::Error::new( return Err(anyhow::Error::from(std::io::Error::other(
ErrorKind::Other,
"Token is empty!", "Token is empty!",
))); )));
} }