Exemplo n.º 1
0
 public Settings()
 {
     App     = new App();
     Format  = new Format();
     Peloton = new Peloton();
     Garmin  = new Garmin();
 }
Exemplo n.º 2
0
 public Configuration()
 {
     App           = new App();
     Format        = new Format();
     Peloton       = new Peloton();
     Garmin        = new Garmin();
     Observability = new Observability();
     Developer     = new Developer();
 }
    public async Task <SettingsGarminGetResponse> GarminPost([FromBody] Common.Garmin updatedGarminSettings)
    {
        using var tracing = Tracing.Trace($"{nameof(SettingsController)}.{nameof(GarminPost)}");

        // TODO: Validation

        var settings = await _settingsService.GetSettingsAsync();

        settings.Garmin = updatedGarminSettings;

        await _settingsService.UpdateSettings(settings);

        var updatedSettings = await _settingsService.GetSettingsAsync();

        var settingsResponse = new SettingsGetResponse(updatedSettings);

        settingsResponse.Garmin.Password = null;

        return(settingsResponse.Garmin);
    }