From ed949b96781774f39811f642d6d720ea6ef951b7 Mon Sep 17 00:00:00 2001 From: Antoine Gersant Date: Sun, 28 Oct 2018 10:22:28 -0700 Subject: [PATCH] Require admin rights to trigger reindex --- src/rocket_api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rocket_api.rs b/src/rocket_api.rs index 783acae..32c4383 100644 --- a/src/rocket_api.rs +++ b/src/rocket_api.rs @@ -98,7 +98,7 @@ fn put_settings(db: State, _admin_rights: AdminRights, config: Json) } #[post("/trigger_index")] -fn trigger_index(command_sender: State>) -> Result<(), errors::Error> { +fn trigger_index(command_sender: State>, _admin_rights: AdminRights) -> Result<(), errors::Error> { command_sender.trigger_reindex()?; Ok(()) }