Move unreachable debug statement
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
890eb8fba5
commit
0c1627e726
1 changed files with 2 additions and 2 deletions
|
@ -62,12 +62,12 @@ async fn hooks_inner(req: Request<Incoming>, secret: &str) -> Result<Hook, Error
|
||||||
whole_body.reader().read_to_end(&mut payload)?;
|
whole_body.reader().read_to_end(&mut payload)?;
|
||||||
|
|
||||||
if let Some(val) = headers.get("X-Gitlab-Token") {
|
if let Some(val) = headers.get("X-Gitlab-Token") {
|
||||||
debug!("Found Gitlab payload");
|
|
||||||
if secret != val {
|
if secret != val {
|
||||||
return Err(Error::InvalidSecret);
|
return Err(Error::InvalidSecret);
|
||||||
}
|
}
|
||||||
|
|
||||||
let hook: GitlabHook = serde_json::from_slice(&payload[..])?;
|
let hook: GitlabHook = serde_json::from_slice(&payload[..])?;
|
||||||
|
debug!("Found Gitlab payload");
|
||||||
return Ok(Hook::Gitlab(hook));
|
return Ok(Hook::Gitlab(hook));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ async fn hooks_inner(req: Request<Incoming>, secret: &str) -> Result<Hook, Error
|
||||||
}
|
}
|
||||||
|
|
||||||
let hook: ForgejoHook = serde_json::from_slice(&payload[..])?;
|
let hook: ForgejoHook = serde_json::from_slice(&payload[..])?;
|
||||||
return Ok(Hook::Forgejo(hook));
|
|
||||||
debug!("Found Forgejo payload.");
|
debug!("Found Forgejo payload.");
|
||||||
|
return Ok(Hook::Forgejo(hook));
|
||||||
}
|
}
|
||||||
|
|
||||||
// No match found for the payload
|
// No match found for the payload
|
||||||
|
|
Loading…
Reference in a new issue