Compare commits
3 Commits
f7993a0ada
...
f5cef456fb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5cef456fb | ||
| 737982ac20 | |||
| 9543dd78cf |
@ -71,7 +71,9 @@ pub async fn login(
|
||||
let req = request.into_inner();
|
||||
let users = user_list.lock().await;
|
||||
|
||||
if let Some(user) = users.iter().find(|u| u.person.name == req.username)
|
||||
if let Some(user) = users
|
||||
.iter()
|
||||
.find(|u| u.person.name.to_lowercase() == req.username.to_lowercase())
|
||||
&& bcrypt::verify(&req.password, &user.password_hash).unwrap_or(false)
|
||||
{
|
||||
let token = Uuid::new_v4().to_string();
|
||||
|
||||
@ -78,14 +78,14 @@ async fn add_game(
|
||||
let mut games = game_list.lock().await;
|
||||
let mut game = game.into_inner();
|
||||
|
||||
if games.iter().any(|g| {
|
||||
game.title = game.title.trim().to_string();
|
||||
|
||||
if let Some(existing) = games.iter().find(|g| {
|
||||
g.title == game.title || (g.remote_id == game.remote_id && g.source == game.source)
|
||||
}) {
|
||||
return None;
|
||||
return Some(existing.clone());
|
||||
}
|
||||
|
||||
game.title = game.title.trim().to_string();
|
||||
|
||||
games.push(game.clone());
|
||||
|
||||
games.sort_unstable_by(|g1, g2| g1.title.cmp(&g2.title));
|
||||
|
||||
25
frontend/pnpm-lock.yaml
generated
25
frontend/pnpm-lock.yaml
generated
@ -53,7 +53,7 @@ importers:
|
||||
version: 16.5.0
|
||||
ts-proto:
|
||||
specifier: ^2.8.3
|
||||
version: 2.8.3
|
||||
version: 2.10.0
|
||||
typescript:
|
||||
specifier: ~5.9.3
|
||||
version: 5.9.3
|
||||
@ -152,6 +152,9 @@ packages:
|
||||
'@bufbuild/protobuf@2.10.1':
|
||||
resolution: {integrity: sha512-ckS3+vyJb5qGpEYv/s1OebUHDi/xSNtfgw1wqKZo7MR9F2z+qXr0q5XagafAG/9O0QPVIUfST0smluYSTpYFkg==}
|
||||
|
||||
'@bufbuild/protobuf@2.10.2':
|
||||
resolution: {integrity: sha512-uFsRXwIGyu+r6AMdz+XijIIZJYpoWeYzILt5yZ2d3mCjQrWUTVpVD9WL/jZAbvp+Ed04rOhrsk7FiTcEDseB5A==}
|
||||
|
||||
'@emnapi/core@1.7.1':
|
||||
resolution: {integrity: sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==}
|
||||
|
||||
@ -425,7 +428,7 @@ packages:
|
||||
resolution: {integrity: sha512-EcA07pHJouywpzsoTUqNh5NwGayl2PPVEJKUSinGGSxFGYn+shYbqMGBg6FXDqgXum9Ou/ecb+411ssw8HImJQ==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
peerDependencies:
|
||||
vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0
|
||||
vite: npm:rolldown-vite@7.2.5
|
||||
|
||||
acorn-jsx@5.3.2:
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
@ -990,11 +993,11 @@ packages:
|
||||
ts-poet@6.12.0:
|
||||
resolution: {integrity: sha512-xo+iRNMWqyvXpFTaOAvLPA5QAWO6TZrSUs5s4Odaya3epqofBu/fMLHEWl8jPmjhA0s9sgj9sNvF1BmaQlmQkA==}
|
||||
|
||||
ts-proto-descriptors@2.0.0:
|
||||
resolution: {integrity: sha512-wHcTH3xIv11jxgkX5OyCSFfw27agpInAd6yh89hKG6zqIXnjW9SYqSER2CVQxdPj4czeOhGagNvZBEbJPy7qkw==}
|
||||
ts-proto-descriptors@2.1.0:
|
||||
resolution: {integrity: sha512-S5EZYEQ6L9KLFfjSRpZWDIXDV/W7tAj8uW7pLsihIxyr62EAVSiKuVPwE8iWnr849Bqa53enex1jhDUcpgquzA==}
|
||||
|
||||
ts-proto@2.8.3:
|
||||
resolution: {integrity: sha512-TdXInqG+61pj/TvORqITWjvjTTsL1EZxwX49iEj89+xFAcqPT8tjChpAGQXzfcF4MJwvNiuoCEbBOKqVf3ds3g==}
|
||||
ts-proto@2.10.0:
|
||||
resolution: {integrity: sha512-GHzqUHCSXorbFi6Qcm5yKOApiq/EQb/+uP+7EI5L1Ze66GVljBGaEjapauRjY/LAN+uWMnii6+Kzh1OJLohiVA==}
|
||||
hasBin: true
|
||||
|
||||
tslib@2.8.1:
|
||||
@ -1169,6 +1172,8 @@ snapshots:
|
||||
|
||||
'@bufbuild/protobuf@2.10.1': {}
|
||||
|
||||
'@bufbuild/protobuf@2.10.2': {}
|
||||
|
||||
'@emnapi/core@1.7.1':
|
||||
dependencies:
|
||||
'@emnapi/wasi-threads': 1.1.0
|
||||
@ -1938,16 +1943,16 @@ snapshots:
|
||||
dependencies:
|
||||
dprint-node: 1.0.8
|
||||
|
||||
ts-proto-descriptors@2.0.0:
|
||||
ts-proto-descriptors@2.1.0:
|
||||
dependencies:
|
||||
'@bufbuild/protobuf': 2.10.1
|
||||
|
||||
ts-proto@2.8.3:
|
||||
ts-proto@2.10.0:
|
||||
dependencies:
|
||||
'@bufbuild/protobuf': 2.10.1
|
||||
'@bufbuild/protobuf': 2.10.2
|
||||
case-anything: 2.1.13
|
||||
ts-poet: 6.12.0
|
||||
ts-proto-descriptors: 2.0.0
|
||||
ts-proto-descriptors: 2.1.0
|
||||
|
||||
tslib@2.8.1:
|
||||
optional: true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user