Document worker secret verification

This commit is contained in:
Joscha 2023-10-21 18:46:59 +02:00
parent c051e42c2e
commit de2992ff63
2 changed files with 10 additions and 4 deletions

View file

@ -167,7 +167,7 @@ pub async fn post_api_worker_status(
let (work, abort_work) = {
let mut guard = workers.lock().unwrap();
guard.clean();
if !guard.verify(&name, &request.secret) {
if !guard.verify_secret(&name, &request.secret) {
return Ok((StatusCode::UNAUTHORIZED, "invalid secret").into_response());
}
guard.update(