4 Commits

Author SHA1 Message Date
1781318fdf Fix bad backend URL on generated Qr Code for tokens authentication
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-07-03 22:00:20 +02:00
2560962684 Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-03 08:38:56 +02:00
dc3704f13b Update dependency globals to ^16.2.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-06-26 00:08:43 +00:00
af4c3c4a8f Update dependency eslint-plugin-react-x to ^1.52.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-06-25 00:09:01 +00:00
10 changed files with 121 additions and 112 deletions

View File

@@ -30,7 +30,7 @@ pub async fn create_bucket_if_required() -> anyhow::Result<()> {
log::warn!("The bucket does not seem to exists, trying to create it!")
}
Err(e) => {
log::error!("Got unexpected error when querying bucket info: {}", e);
log::error!("Got unexpected error when querying bucket info: {e}");
return Err(BucketServiceError::FailedFetchBucketInfo.into());
}
}

View File

@@ -50,7 +50,7 @@ impl FromRequest for AccountInPath {
Self::load_account_from_path(&auth, account_id)
.await
.map_err(|e| {
log::error!("Failed to extract account ID from URL! {}", e);
log::error!("Failed to extract account ID from URL! {e}");
actix_web::error::ErrorNotFound("Could not fetch account information!")
})
})

View File

@@ -165,13 +165,13 @@ impl FromRequest for AuthExtractor {
// Update last use (if needed)
if token.shall_update_time_used() {
if let Err(e) = tokens_service::update_time_used(&token).await {
log::error!("Failed to refresh last usage of token! {}", e);
log::error!("Failed to refresh last usage of token! {e}");
}
}
// Handle tokens expiration
if token.is_expired() {
log::error!("Attempted to use expired token! {:?}", token);
log::error!("Attempted to use expired token! {token:?}");
return Err(actix_web::error::ErrorBadRequest("Token has expired!"));
}

View File

@@ -47,7 +47,7 @@ impl FromRequest for FileIdExtractor {
Self::load_file_from_path(&auth, file_id)
.await
.map_err(|e| {
log::error!("Failed to extract file ID from URL! {}", e);
log::error!("Failed to extract file ID from URL! {e}");
actix_web::error::ErrorNotFound("Could not fetch file information!")
})
})

View File

@@ -50,7 +50,7 @@ impl FromRequest for InboxEntryInPath {
Self::load_inbox_entry_from_path(&auth, entry_id)
.await
.map_err(|e| {
log::error!("Failed to extract inbox entry ID from URL! {}", e);
log::error!("Failed to extract inbox entry ID from URL! {e}");
actix_web::error::ErrorNotFound("Could not fetch inbox entry information!")
})
})

View File

@@ -57,7 +57,7 @@ impl FromRequest for MovementInPath {
Self::load_movement_from_path(&auth, account_id)
.await
.map_err(|e| {
log::error!("Failed to extract movement ID from URL! {}", e);
log::error!("Failed to extract movement ID from URL! {e}");
actix_web::error::ErrorNotFound("Could not fetch movement information!")
})
})

View File

@@ -35,11 +35,11 @@
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"eslint": "^9.26.0",
"eslint-plugin-react-dom": "^1.52.2",
"eslint-plugin-react-dom": "^1.49.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^00.4.20",
"eslint-plugin-react-x": "^1.49.0",
"globals": "^16.1.0",
"eslint-plugin-react-x": "^1.52.2",
"globals": "^16.2.0",
"typescript": "~5.8.3",
"typescript-eslint": "^8.32.1",
"vite": "^6.3.5"
@@ -3427,24 +3427,24 @@
}
},
"node_modules/eslint-plugin-react-dom": {
"version": "1.52.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-dom/-/eslint-plugin-react-dom-1.52.2.tgz",
"integrity": "sha512-HDwQTwGfJTFAa4x0Bf9NH/TVHULEFjI0/vBNhkZt7JAHFb7v+SrhlXGUIIKfQTPHHJIAQZm8v3yzc5g/NlCokA==",
"version": "1.49.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-dom/-/eslint-plugin-react-dom-1.49.0.tgz",
"integrity": "sha512-gz+rXbU9evjneshMYclUXHCzFSdt4QHRaLZYJXrdzTBTnROM1lrjvmT72Pt8KYQpiRNIcz1pemyJQmdJ2OQ+Ig==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-react/ast": "1.52.2",
"@eslint-react/core": "1.52.2",
"@eslint-react/eff": "1.52.2",
"@eslint-react/kit": "1.52.2",
"@eslint-react/shared": "1.52.2",
"@eslint-react/var": "1.52.2",
"@typescript-eslint/scope-manager": "^8.34.0",
"@typescript-eslint/types": "^8.34.0",
"@typescript-eslint/utils": "^8.34.0",
"@eslint-react/ast": "1.49.0",
"@eslint-react/core": "1.49.0",
"@eslint-react/eff": "1.49.0",
"@eslint-react/kit": "1.49.0",
"@eslint-react/shared": "1.49.0",
"@eslint-react/var": "1.49.0",
"@typescript-eslint/scope-manager": "^8.31.1",
"@typescript-eslint/types": "^8.31.1",
"@typescript-eslint/utils": "^8.31.1",
"compare-versions": "^6.1.1",
"string-ts": "^2.2.1",
"ts-pattern": "^5.7.1"
"ts-pattern": "^5.7.0"
},
"engines": {
"bun": ">=1.0.15",
@@ -3463,7 +3463,73 @@
}
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@eslint-react/ast": {
"node_modules/eslint-plugin-react-hooks": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz",
"integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
},
"peerDependencies": {
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0"
}
},
"node_modules/eslint-plugin-react-refresh": {
"version": "0.4.20",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.20.tgz",
"integrity": "sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==",
"dev": true,
"license": "MIT",
"peerDependencies": {
"eslint": ">=8.40"
}
},
"node_modules/eslint-plugin-react-x": {
"version": "1.52.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-x/-/eslint-plugin-react-x-1.52.2.tgz",
"integrity": "sha512-Pxpf3YxCUcNgzJVT6blAJ2KvLX32pUxtXndaCZoTdiytFw/H9OZKq4Qczxx/Lpo9Ri5rm4FbIZL3BfL/HGmzBw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-react/ast": "1.52.2",
"@eslint-react/core": "1.52.2",
"@eslint-react/eff": "1.52.2",
"@eslint-react/kit": "1.52.2",
"@eslint-react/shared": "1.52.2",
"@eslint-react/var": "1.52.2",
"@typescript-eslint/scope-manager": "^8.34.0",
"@typescript-eslint/type-utils": "^8.34.0",
"@typescript-eslint/types": "^8.34.0",
"@typescript-eslint/utils": "^8.34.0",
"compare-versions": "^6.1.1",
"is-immutable-type": "^5.0.1",
"string-ts": "^2.2.1",
"ts-pattern": "^5.7.1"
},
"engines": {
"bun": ">=1.0.15",
"node": ">=18.18.0"
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
"ts-api-utils": "^2.1.0",
"typescript": "^4.9.5 || ^5.3.3"
},
"peerDependenciesMeta": {
"eslint": {
"optional": false
},
"ts-api-utils": {
"optional": true
},
"typescript": {
"optional": true
}
}
},
"node_modules/eslint-plugin-react-x/node_modules/@eslint-react/ast": {
"version": "1.52.2",
"resolved": "https://registry.npmjs.org/@eslint-react/ast/-/ast-1.52.2.tgz",
"integrity": "sha512-L0Tbbzx5l7JHgkQ1TqPWQuZ4+PsXDcgtt3056FOYqstUrDRG+5ylm7h3gEWu98I3FDdgLS8q9dOzz0PGgwZCTA==",
@@ -3482,7 +3548,7 @@
"node": ">=18.18.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@eslint-react/core": {
"node_modules/eslint-plugin-react-x/node_modules/@eslint-react/core": {
"version": "1.52.2",
"resolved": "https://registry.npmjs.org/@eslint-react/core/-/core-1.52.2.tgz",
"integrity": "sha512-FpxKZJHlf3zXETNL+WQP/SoYuVQNheWm1iDgW68RyHygD8mzk9CnVLDgjMrfmh2n0eaOqnWCL/IC2YzD6VpYOQ==",
@@ -3506,7 +3572,7 @@
"node": ">=18.18.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@eslint-react/eff": {
"node_modules/eslint-plugin-react-x/node_modules/@eslint-react/eff": {
"version": "1.52.2",
"resolved": "https://registry.npmjs.org/@eslint-react/eff/-/eff-1.52.2.tgz",
"integrity": "sha512-YBPE2J1+PfXrR9Ct+9rQsw8uRU06zHopI508cfj0usaIBf3hz18V2GoRTVhsjniP0QbvKQdHzyPmmS/B6uyMZQ==",
@@ -3517,7 +3583,7 @@
"node": ">=18.18.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@eslint-react/kit": {
"node_modules/eslint-plugin-react-x/node_modules/@eslint-react/kit": {
"version": "1.52.2",
"resolved": "https://registry.npmjs.org/@eslint-react/kit/-/kit-1.52.2.tgz",
"integrity": "sha512-k0cSgFnPlDPI1xyRzHjEWIapLG0zCy7mx1HBLg5wuKf/zzSh3iNFId53xMebR05vM2k9YH63gsvTwRkGx/77Zw==",
@@ -3534,7 +3600,7 @@
"node": ">=18.18.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@eslint-react/shared": {
"node_modules/eslint-plugin-react-x/node_modules/@eslint-react/shared": {
"version": "1.52.2",
"resolved": "https://registry.npmjs.org/@eslint-react/shared/-/shared-1.52.2.tgz",
"integrity": "sha512-YHysVcCfmBoxt2+6Ao4HdLPUYNSem70gy+0yzOQvlQFSsGhh+uifQ68SSa/2uJBWfNUm9xQlyDsr2raeO4BlgA==",
@@ -3552,7 +3618,7 @@
"node": ">=18.18.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@eslint-react/var": {
"node_modules/eslint-plugin-react-x/node_modules/@eslint-react/var": {
"version": "1.52.2",
"resolved": "https://registry.npmjs.org/@eslint-react/var/-/var-1.52.2.tgz",
"integrity": "sha512-/7IYMPsmO0tIYqkqAVnkqB4eXeVBvgBL/a9hcGCO2eUSzslYzQHSzNPhIoPLD9HXng+0CWlT+KupOFIqP9a26A==",
@@ -3572,7 +3638,7 @@
"node": ">=18.18.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@typescript-eslint/scope-manager": {
"node_modules/eslint-plugin-react-x/node_modules/@typescript-eslint/scope-manager": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.35.0.tgz",
"integrity": "sha512-+AgL5+mcoLxl1vGjwNfiWq5fLDZM1TmTPYs2UkyHfFhgERxBbqHlNjRzhThJqz+ktBqTChRYY6zwbMwy0591AA==",
@@ -3590,7 +3656,7 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@typescript-eslint/type-utils": {
"node_modules/eslint-plugin-react-x/node_modules/@typescript-eslint/type-utils": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.35.0.tgz",
"integrity": "sha512-ceNNttjfmSEoM9PW87bWLDEIaLAyR+E6BoYJQ5PfaDau37UGca9Nyq3lBk8Bw2ad0AKvYabz6wxc7DMTO2jnNA==",
@@ -3614,7 +3680,7 @@
"typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@typescript-eslint/types": {
"node_modules/eslint-plugin-react-x/node_modules/@typescript-eslint/types": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.0.tgz",
"integrity": "sha512-0mYH3emanku0vHw2aRLNGqe7EXh9WHEhi7kZzscrMDf6IIRUQ5Jk4wp1QrledE/36KtdZrVfKnE32eZCf/vaVQ==",
@@ -3628,7 +3694,7 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@typescript-eslint/typescript-estree": {
"node_modules/eslint-plugin-react-x/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.0.tgz",
"integrity": "sha512-F+BhnaBemgu1Qf8oHrxyw14wq6vbL8xwWKKMwTMwYIRmFFY/1n/9T/jpbobZL8vp7QyEUcC6xGrnAO4ua8Kp7w==",
@@ -3657,7 +3723,7 @@
"typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@typescript-eslint/utils": {
"node_modules/eslint-plugin-react-x/node_modules/@typescript-eslint/utils": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.35.0.tgz",
"integrity": "sha512-nqoMu7WWM7ki5tPgLVsmPM8CkqtoPUG6xXGeefM5t4x3XumOEKMoUZPdi+7F+/EotukN4R9OWdmDxN80fqoZeg==",
@@ -3681,7 +3747,7 @@
"typescript": ">=4.8.4 <5.9.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/@typescript-eslint/visitor-keys": {
"node_modules/eslint-plugin-react-x/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.35.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.0.tgz",
"integrity": "sha512-zTh2+1Y8ZpmeQaQVIc/ZZxsx8UzgKJyNg1PTvjzC7WMhPSVS8bfDX34k1SrwOf016qd5RU3az2UxUNue3IfQ5g==",
@@ -3699,7 +3765,7 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/brace-expansion": {
"node_modules/eslint-plugin-react-x/node_modules/brace-expansion": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
@@ -3709,7 +3775,7 @@
"balanced-match": "^1.0.0"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/minimatch": {
"node_modules/eslint-plugin-react-x/node_modules/minimatch": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
@@ -3725,7 +3791,7 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/eslint-plugin-react-dom/node_modules/semver": {
"node_modules/eslint-plugin-react-x/node_modules/semver": {
"version": "7.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
@@ -3738,72 +3804,6 @@
"node": ">=10"
}
},
"node_modules/eslint-plugin-react-hooks": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz",
"integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
},
"peerDependencies": {
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0"
}
},
"node_modules/eslint-plugin-react-refresh": {
"version": "0.4.20",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.20.tgz",
"integrity": "sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==",
"dev": true,
"license": "MIT",
"peerDependencies": {
"eslint": ">=8.40"
}
},
"node_modules/eslint-plugin-react-x": {
"version": "1.49.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-x/-/eslint-plugin-react-x-1.49.0.tgz",
"integrity": "sha512-yRh5nN8Z1Xoq26dt40Jnbqg8Z3N/svD4v7bT7sAWGslhCpxAGJEnOpj6V0L0xmw4ztz7ZonHt/4ks7mEOpagmQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-react/ast": "1.49.0",
"@eslint-react/core": "1.49.0",
"@eslint-react/eff": "1.49.0",
"@eslint-react/kit": "1.49.0",
"@eslint-react/shared": "1.49.0",
"@eslint-react/var": "1.49.0",
"@typescript-eslint/scope-manager": "^8.31.1",
"@typescript-eslint/type-utils": "^8.31.1",
"@typescript-eslint/types": "^8.31.1",
"@typescript-eslint/utils": "^8.31.1",
"compare-versions": "^6.1.1",
"is-immutable-type": "^5.0.1",
"string-ts": "^2.2.1",
"ts-pattern": "^5.7.0"
},
"engines": {
"bun": ">=1.0.15",
"node": ">=18.18.0"
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
"ts-api-utils": "^2.1.0",
"typescript": "^4.9.5 || ^5.3.3"
},
"peerDependenciesMeta": {
"eslint": {
"optional": false
},
"ts-api-utils": {
"optional": true
},
"typescript": {
"optional": true
}
}
},
"node_modules/eslint-scope": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz",
@@ -4265,9 +4265,9 @@
}
},
"node_modules/globals": {
"version": "16.1.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-16.1.0.tgz",
"integrity": "sha512-aibexHNbb/jiUSObBgpHLj+sIuUmJnYcgXBlrfsiDZ9rt4aF2TFRbyLgZ2iFQuVZ1K5Mx3FVkbKRSgKrbK3K2g==",
"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": {

View File

@@ -37,11 +37,11 @@
"@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.6.0",
"eslint": "^9.26.0",
"eslint-plugin-react-dom": "^1.52.2",
"eslint-plugin-react-dom": "^1.49.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^00.4.20",
"eslint-plugin-react-x": "^1.49.0",
"globals": "^16.1.0",
"eslint-plugin-react-x": "^1.52.2",
"globals": "^16.2.0",
"typescript": "~5.8.3",
"typescript-eslint": "^8.32.1",
"vite": "^6.3.5"

View File

@@ -31,12 +31,21 @@ export class APIClient {
return URL;
}
/**
* Get the full URL at which the backend can be contacted
*/
static ActualBackendURL(): string {
const backendURL = this.backendURL();
if (backendURL.startsWith("/")) return `${location.origin}${backendURL}`;
else return backendURL;
}
/**
* Check out whether the backend is accessed through
* HTTPS or not
*/
static IsBackendSecure(): boolean {
return this.backendURL().startsWith("https");
return this.ActualBackendURL().startsWith("https");
}
/**

View File

@@ -268,7 +268,7 @@ function CreatedToken(p: { token: TokenWithSecret }): React.ReactElement {
<div style={{ padding: "15px", backgroundColor: "white" }}>
<QRCodeCanvas
value={`moneymgr://api=${encodeURIComponent(
APIClient.backendURL()
APIClient.ActualBackendURL()
)}&id=${p.token.id}&secret=${p.token.token}`}
/>
</div>