Compare commits
2 Commits
3eb043b24c
...
047ccfa754
Author | SHA1 | Date | |
---|---|---|---|
047ccfa754 | |||
b0d9a67c1c |
@ -19,4 +19,4 @@ public enum OAuthProvider
|
|||||||
/// OAuth provider for Mail.ru.
|
/// OAuth provider for Mail.ru.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
MailRu
|
MailRu
|
||||||
}
|
}
|
@ -29,4 +29,4 @@ public class PasswordPolicy
|
|||||||
/// Gets or sets a value indicating whether at least one special character is required in the password.
|
/// Gets or sets a value indicating whether at least one special character is required in the password.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool RequireSpecialCharacter { get; set; }
|
public bool RequireSpecialCharacter { get; set; }
|
||||||
}
|
}
|
@ -14,4 +14,4 @@ public enum TwoFactorAuthentication
|
|||||||
/// TOTP (Time-based One-Time Password) is required for additional verification.
|
/// TOTP (Time-based One-Time Password) is required for additional verification.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
TotpRequired,
|
TotpRequired,
|
||||||
}
|
}
|
@ -27,4 +27,4 @@ public class CreateUserRequest
|
|||||||
[Required]
|
[Required]
|
||||||
[MinLength(2)]
|
[MinLength(2)]
|
||||||
public required string Password { get; set; }
|
public required string Password { get; set; }
|
||||||
}
|
}
|
@ -34,4 +34,4 @@ public class ScheduleRequest
|
|||||||
/// Gets or sets an array of lesson type IDs.
|
/// Gets or sets an array of lesson type IDs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int[]? LessonType { get; set; } = null;
|
public int[]? LessonType { get; set; } = null;
|
||||||
}
|
}
|
@ -28,4 +28,4 @@ public class CampusDetailsResponse
|
|||||||
/// Gets or sets the address of the campus (optional).
|
/// Gets or sets the address of the campus (optional).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? Address { get; set; }
|
public string? Address { get; set; }
|
||||||
}
|
}
|
@ -114,4 +114,4 @@ public class ScheduleResponse
|
|||||||
/// Gets or sets the links to online meetings for the schedule entry.
|
/// Gets or sets the links to online meetings for the schedule entry.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public required IEnumerable<string?> LinkToMeet { get; set; }
|
public required IEnumerable<string?> LinkToMeet { get; set; }
|
||||||
}
|
}
|
@ -16,4 +16,4 @@ public static class CronUpdateSkipConverter
|
|||||||
}).ToList();
|
}).ToList();
|
||||||
public static List<ScheduleSettings.CronUpdateSkip> ConvertFromDto(this IEnumerable<Dto.Common.CronUpdateSkip> pairPeriod) =>
|
public static List<ScheduleSettings.CronUpdateSkip> ConvertFromDto(this IEnumerable<Dto.Common.CronUpdateSkip> pairPeriod) =>
|
||||||
pairPeriod.Select(x => x.Get()).ToList();
|
pairPeriod.Select(x => x.Get()).ToList();
|
||||||
}
|
}
|
@ -11,4 +11,4 @@ public static class PairPeriodTimeConverter
|
|||||||
|
|
||||||
public static Dictionary<int, ScheduleSettings.PairPeriodTime> ConvertFromDto(this IDictionary<int, Dto.Common.PairPeriodTime> pairPeriod) =>
|
public static Dictionary<int, ScheduleSettings.PairPeriodTime> ConvertFromDto(this IDictionary<int, Dto.Common.PairPeriodTime> pairPeriod) =>
|
||||||
pairPeriod.ToDictionary(kvp => kvp.Key, kvp => new ScheduleSettings.PairPeriodTime(kvp.Value.Start, kvp.Value.End));
|
pairPeriod.ToDictionary(kvp => kvp.Key, kvp => new ScheduleSettings.PairPeriodTime(kvp.Value.Start, kvp.Value.End));
|
||||||
}
|
}
|
@ -45,32 +45,31 @@ public static class CronUpdateSkipService
|
|||||||
if (depth <= 0)
|
if (depth <= 0)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
currentDate ??= DateOnly.FromDateTime(DateTime.Now);
|
DateTimeOffset nextRunTime = (currentDate?.ToDateTime(TimeOnly.MinValue) ?? DateTime.Now).ToUniversalTime();
|
||||||
DateTimeOffset nextRunTime = currentDate.Value.ToDateTime(TimeOnly.FromDateTime(DateTime.Now));
|
|
||||||
|
|
||||||
List<DateTimeOffset> result = [];
|
List<DateTimeOffset> result = [];
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
var lastSkip = data.FilterDateEntry(nextRunTime.DateTime).LastOrDefault();
|
var lastSkippedEntry = data.FilterDateEntry(nextRunTime.DateTime).LastOrDefault();
|
||||||
|
|
||||||
if (lastSkip is { Start: not null, End: not null })
|
if (lastSkippedEntry is { Start: not null, End: not null })
|
||||||
nextRunTime = new DateTimeOffset(lastSkip.End.Value.AddDays(1), new TimeOnly(0, 0, 0), TimeSpan.Zero);
|
nextRunTime = lastSkippedEntry.End.Value.ToDateTime(TimeOnly.MinValue).AddDays(1);
|
||||||
else if (lastSkip.Date.HasValue)
|
else if (lastSkippedEntry.Date.HasValue)
|
||||||
nextRunTime = new DateTimeOffset(lastSkip.Date.Value.AddDays(1), new TimeOnly(0, 0, 0), TimeSpan.Zero);
|
nextRunTime = lastSkippedEntry.Date.Value.ToDateTime(TimeOnly.MinValue).AddDays(1);
|
||||||
|
|
||||||
var next = expression.GetNextOccurrence(nextRunTime.ToUniversalTime(), TimeZoneInfo.Local);
|
var nextOccurrence = expression.GetNextOccurrence(nextRunTime.AddMinutes(-1), TimeZoneInfo.Local);
|
||||||
|
|
||||||
if (!next.HasValue)
|
if (!nextOccurrence.HasValue)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
nextRunTime = next.Value;
|
if (data.FilterDateEntry(nextOccurrence.Value.DateTime).Count != 0)
|
||||||
|
{
|
||||||
if (data.FilterDateEntry(nextRunTime.DateTime).Any())
|
nextRunTime = nextOccurrence.Value.AddDays(1);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
result.Add(nextRunTime);
|
result.Add(nextOccurrence.Value.ToLocalTime());
|
||||||
nextRunTime = nextRunTime.AddMinutes(1);
|
nextRunTime = nextOccurrence.Value.AddMinutes(1);
|
||||||
|
|
||||||
} while (result.Count < depth);
|
} while (result.Count < depth);
|
||||||
|
|
||||||
|
@ -64,4 +64,4 @@ public static class JwtConfiguration
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -99,4 +99,4 @@ public static class LoggerConfiguration
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,4 +2,4 @@
|
|||||||
public interface ISaveSettings
|
public interface ISaveSettings
|
||||||
{
|
{
|
||||||
void SaveSetting();
|
void SaveSetting();
|
||||||
}
|
}
|
@ -13,4 +13,4 @@ public interface ICacheService
|
|||||||
|
|
||||||
Task<T?> GetAsync<T>(string key, CancellationToken cancellationToken = default);
|
Task<T?> GetAsync<T>(string key, CancellationToken cancellationToken = default);
|
||||||
Task RemoveAsync(string key, CancellationToken cancellationToken = default);
|
Task RemoveAsync(string key, CancellationToken cancellationToken = default);
|
||||||
}
|
}
|
@ -26,4 +26,4 @@ public class CookieOptions
|
|||||||
|
|
||||||
internal void DropCookie(HttpContext context, string name) =>
|
internal void DropCookie(HttpContext context, string name) =>
|
||||||
SetCookie(context, name, "", DateTimeOffset.MinValue);
|
SetCookie(context, name, "", DateTimeOffset.MinValue);
|
||||||
}
|
}
|
@ -386,4 +386,4 @@ namespace MysqlMigrations.Migrations
|
|||||||
name: "Campus");
|
name: "Campus");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -80,4 +80,4 @@ namespace MysqlMigrations.Migrations
|
|||||||
onDelete: ReferentialAction.SetNull);
|
onDelete: ReferentialAction.SetNull);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -362,4 +362,4 @@ namespace PsqlMigrations.Migrations
|
|||||||
name: "Campus");
|
name: "Campus");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -46,4 +46,4 @@ namespace PsqlMigrations.Migrations
|
|||||||
onDelete: ReferentialAction.SetNull);
|
onDelete: ReferentialAction.SetNull);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -361,4 +361,4 @@ namespace SqliteMigrations.Migrations
|
|||||||
name: "Campus");
|
name: "Campus");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -46,4 +46,4 @@ namespace SqliteMigrations.Migrations
|
|||||||
onDelete: ReferentialAction.SetNull);
|
onDelete: ReferentialAction.SetNull);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -19,4 +19,4 @@ public static class ModelBuilderExtensions
|
|||||||
var applyConcreteMethod = applyGenericMethod.MakeGenericMethod(entityType);
|
var applyConcreteMethod = applyGenericMethod.MakeGenericMethod(entityType);
|
||||||
applyConcreteMethod.Invoke(modelBuilder, [configuration]);
|
applyConcreteMethod.Invoke(modelBuilder, [configuration]);
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user