-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger a profile (e.g., tag, photo, etc.) update on visit. #114
Conversation
Signed-off-by: Carlos R <[email protected]>
Signed-off-by: Carlos R <[email protected]>
Signed-off-by: Carlos R <[email protected]>
Signed-off-by: Carlos R <[email protected]>
Signed-off-by: Carlos R <[email protected]>
Signed-off-by: Carlos R <[email protected]>
Signed-off-by: Carlos R <[email protected]>
Signed-off-by: Carlos R <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #114 +/- ##
==========================================
- Coverage 14.85% 14.79% -0.07%
==========================================
Files 24 24
Lines 1494 1501 +7
==========================================
Hits 222 222
- Misses 1272 1279 +7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
.get_results::<Player>(&mut db_connection) | ||
.await?; | ||
|
||
let query = diesel::sql_query("SELECT * FROM players WHERE gamer_tag ILIKE $1 ORDER BY LENGTH(gamer_tag) ASC, player_id ASC") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idk why GitHub is showing this as a change considering you only changed this in your old PR and main
looks like:
Line 69 in 6d3ada3
let query = diesel::sql_query("SELECT * FROM players WHERE gamer_tag ILIKE $1 ORDER BY LENGTH(gamer_tag) ASC, player_id ASC") |
make_pidgtm_player_getter_query(id, Arc::new(Mutex::new(PIDGTM_PlayerGetterVars::empty()))) | ||
.await | ||
{ | ||
add_new_player_to_pidgtm_db(&player_data.player.unwrap()).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose the name of this function is a bit confusing at this point 😅
Does as it says, If the account already exists it just runs an update as expected.
Uses
add_new_player_to_pidgtm_db
instead of an update function to simultaneously solve issues where accounts may not exist for some reason. While they may not be found on the search engine, visiting them directly will add them.(Their page will not load, but it will be added to search and on refresh it will. Before, it would not load ever unless fixed manually)
Closes #111