public IActionResult Delete([FromHeaderAttribute] string Authorization, string id) { if (isAuthorized(Authorization)) { var subscribe = _subscribeService.Get(id); if (subscribe == null) { return(NotFound()); } _subscribeService.Remove(subscribe._id); return(NoContent()); } else { return(Unauthorized()); } }