public IActionResult BroadcasterCode( [FromServices] API.Twitch.IBroadcasterTokenValidator broadcasterTokenValidator, [FromQuery(Name = "code")] string code, [FromQuery(Name = "state")] string state) { broadcasterTokenValidator.SetCode(code, state); return(Ok()); }
public IActionResult BroadcasterCode( [FromServices] API.Twitch.IBroadcasterTokenValidator broadcasterTokenValidator, [FromQuery(Name = "code")] string code, [FromQuery(Name = "state")] string state) { if (string.IsNullOrEmpty(code) || string.IsNullOrEmpty(state)) { return(BadRequest()); } broadcasterTokenValidator.SetCode(code, state); return(Ok()); }