public async Task <ActionResult> SubscribeState(SubModel model) { if (model.State == "sub" || model.State == "unsub") { var username = User.GetUserName(); string link = username; var result = await subService.SubState(model.SubTo, username, model.State, link); if (result) { return(Ok()); } } return(BadRequest()); }