public async Task <IActionResult> ActivatePostAsync([FromBody] ActivationPost activationPost) { if (!User.IsAdmin()) { return(Unauthorized()); } try { await _activationService.ActivatePost(activationPost.PostId); return(Ok()); } catch (Exception e) { _logger.LogError($"Returning exception: {e.Message}"); return(Json(new ExceptionDto { Error = e.Message })); } }