Require admin rights to trigger reindex
This commit is contained in:
parent
36e6016e67
commit
ed949b9678
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ fn put_settings(db: State<DB>, _admin_rights: AdminRights, config: Json<Config>)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[post("/trigger_index")]
|
#[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()?;
|
command_sender.trigger_reindex()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue