Skip to content

Commit

Permalink
Merge pull request 'fix Bugs 71659 and 71656' (#81) from bugfix/71659…
Browse files Browse the repository at this point in the history
…_and_71656 into release/v3.0.0
  • Loading branch information
pavelbannov committed Nov 14, 2024
2 parents 22609a9 + 51fd85d commit e80b931
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions common/ASC.Api.Core/Core/BaseStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ bool EnableNoLimiter(IPAddress address)
{
options.JsonSerializerOptions.WriteIndented = false;
options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString;
};

services.AddControllers().AddJsonOptions(jsonOptions);
Expand Down
2 changes: 1 addition & 1 deletion common/services/ASC.Data.Backup/Api/BackupController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public async Task<bool> CreateBackupScheduleAsync(BackupScheduleDto inDto)
{
Period = inDto.CronParams.Period ?? BackupPeriod.EveryDay,
Hour = inDto.CronParams.Hour,
Day = inDto.CronParams.Day
Day = inDto.CronParams.Day.HasValue ? inDto.CronParams.Day.Value : 0
};
if(backupStored is > 30 or < 1)
{
Expand Down
1 change: 1 addition & 0 deletions common/services/ASC.Data.Backup/ApiModels/BackupDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class BackupDto
/// <summary>
/// Storage type
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public BackupStorageType? StorageType { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public class BackupRestoreDto
/// <summary>
/// Storage type
/// </summary>
public int? StorageType { get; set; }
[JsonConverter(typeof(JsonStringEnumConverter))]
public BackupStorageType? StorageType { get; set; }

/// <summary>
/// Storage parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class BackupScheduleDto
/// <summary>
/// Storage type
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public BackupStorageType? StorageType { get; set; }

/// <summary>
Expand Down Expand Up @@ -65,6 +66,7 @@ public class Cron
/// <summary>
/// Period
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public BackupPeriod? Period { get; set; }

/// <summary>
Expand All @@ -77,5 +79,5 @@ public class Cron
/// Day
/// </summary>
[SwaggerSchemaCustom(Example = 0)]
public int Day { get; set; }
public int? Day { get; set; }
}
2 changes: 2 additions & 0 deletions common/services/ASC.Data.Backup/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode

global using System.Text.Json.Serialization;

global using ASC.Api.Collections;
global using ASC.Api.Core;
global using ASC.Api.Core.Extensions;
Expand Down
1 change: 1 addition & 0 deletions web/ASC.Web.Api/ApiModels/RequestsDto/TfaRequestsDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class TfaRequestsDto
/// <summary>
/// TFA type (None, Sms, or App)
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public TfaRequestsDtoType? Type { get; set; }

/// <summary>
Expand Down

0 comments on commit e80b931

Please sign in to comment.