public async Task <IActionResult> UpdatePostsAsync() { var signature = Request.Headers["X-Hub-Signature"]; using (var reader = new StreamReader(Request.Body)) { var payload = await reader.ReadToEndAsync(); if (_gitRepository.IsSecretValid(signature, payload)) { _gitRepository.Pull(); _fileParserService.ParseExistingFiles(); _rssFeedService.CreateRssFeed(); return(Ok()); } } return(Unauthorized()); }