public async Task <IActionResult> TestOverseerrSettings([FromBody] TestOverseerrSettingsModel model) { try { await OverseerrClient.TestConnectionAsync(_httpClientFactory.CreateClient(), _logger, new RequestrrBot.DownloadClients.Overseerr.OverseerrSettings { ApiKey = model.ApiKey.Trim(), Hostname = model.Hostname.Trim(), Port = model.Port, UseSSL = model.UseSSL, Version = model.Version, }); return(Ok(new { ok = true })); } catch (System.Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <ActionResult <SonarrServiceSettings> > GetOverseerrSonarrServiceSettings([FromBody] TestOverseerrSettingsModel model) { try { var sonarrServiceSettings = await OverseerrClient.GetSonarrServiceSettingsAsync(_httpClientFactory.CreateClient(), _logger, new RequestrrBot.DownloadClients.Overseerr.OverseerrTestSettings { ApiKey = model.ApiKey.Trim(), Hostname = model.Hostname.Trim(), Port = model.Port, UseSSL = model.UseSSL, DefaultApiUserId = model.DefaultApiUserID, Version = model.Version, }); return(sonarrServiceSettings); } catch (System.Exception ex) { return(BadRequest(ex.Message)); } }