neon_arch commited on
Commit
26aa345
โ€ข
1 Parent(s): b7a23f1

๐Ÿšธ chore: pass the `safe_search_level` & `upstream_search_engines` as a hashmap in the `settings` view function (#461)

Browse files
Files changed (1) hide show
  1. src/server/router.rs +2 -4
src/server/router.rs CHANGED
@@ -69,13 +69,11 @@ pub async fn settings(
69
  ) -> Result<HttpResponse, Box<dyn std::error::Error>> {
70
  Ok(HttpResponse::Ok().body(
71
  crate::templates::views::settings::settings(
 
72
  &config.style.colorscheme,
73
  &config.style.theme,
74
  &config.style.animation,
75
- &config
76
- .upstream_search_engines
77
- .keys()
78
- .collect::<Vec<&String>>(),
79
  )?
80
  .0,
81
  ))
 
69
  ) -> Result<HttpResponse, Box<dyn std::error::Error>> {
70
  Ok(HttpResponse::Ok().body(
71
  crate::templates::views::settings::settings(
72
+ config.safe_search,
73
  &config.style.colorscheme,
74
  &config.style.theme,
75
  &config.style.animation,
76
+ &config.upstream_search_engines,
 
 
 
77
  )?
78
  .0,
79
  ))