Require admin rights to trigger reindex

This commit is contained in:
Antoine Gersant 2018-10-28 10:22:28 -07:00
parent 36e6016e67
commit ed949b9678

View file

@ -98,7 +98,7 @@ fn put_settings(db: State<DB>, _admin_rights: AdminRights, config: Json<Config>)
}
#[post("/trigger_index")]
fn trigger_index(command_sender: State<Arc<index::CommandSender>>) -> Result<(), errors::Error> {
fn trigger_index(command_sender: State<Arc<index::CommandSender>>, _admin_rights: AdminRights) -> Result<(), errors::Error> {
command_sender.trigger_reindex()?;
Ok(())
}