Skip to content

Commit

Permalink
Change refresh_watchlist_instances to POST (#1525)
Browse files Browse the repository at this point in the history
  • Loading branch information
damianhxy committed May 20, 2022
1 parent 6cdf141 commit bd3a9ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/watchlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ function refresh_watchlist(){

// uses formantic ui loading class
$("#refresh_btn").addClass('loading');
$.getJSON(watchlist_endpoints['refresh'],function(){
$.post(watchlist_endpoints['refresh'],function(){

// set last updated time to now on success
$('#last-updated-time')
Expand All @@ -643,7 +643,7 @@ function refresh_watchlist(){
type:"positive",
header:"Successfully refreshed watchlist instances",
message: "The latest instances should be showing now",
});
}, "json");

}).fail(function(){
render_banner({
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
get "get_current_metrics"
get "get_watchlist_instances"
get "get_num_pending_instances"
get "refresh_watchlist_instances"
post "refresh_watchlist_instances"
get "get_watchlist_category_blocklist"
post "update_current_metrics"
post "update_watchlist_instances"
Expand Down

0 comments on commit bd3a9ab

Please sign in to comment.