fmt pass
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
861f26b9e4
commit
2f645d4200
1 changed files with 3 additions and 2 deletions
|
@ -44,8 +44,9 @@ async fn webhooks_inner(req: Request<Body>, token: &str) -> Result<WebHook, Erro
|
|||
debug!("Headers: {:?}", req.headers());
|
||||
|
||||
let headers = req.headers();
|
||||
if let Some(content_type) = headers.get(header::CONTENT_TYPE) &&
|
||||
let Some(header_token) = headers.get("X-Gitlab-Token") {
|
||||
if let Some(content_type) = headers.get(header::CONTENT_TYPE)
|
||||
&& let Some(header_token) = headers.get("X-Gitlab-Token")
|
||||
{
|
||||
if content_type != "application/json" {
|
||||
return Err(Error::InvalidContentType);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue