secure getinstaller endpoint

This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-09-23 15:37:50 +03:00
parent 3167df8bd7
commit b6dd20366e
5 changed files with 26 additions and 10 deletions
+1
View File
@@ -4,4 +4,5 @@ public class ResourcesConfig
{
public string ResourcesFolder { get; set; } = null!;
public string SuiteInstallerFolder { get; set; } = null!;
public string SuiteStageInstallerFolder { get; set; } = null!;
}
+2 -2
View File
@@ -20,7 +20,7 @@ public class GetResourceRequestValidator : AbstractValidator<GetResourceRequest>
{
RuleFor(r => r.Password)
.MinimumLength(8)
.WithErrorCode(ExceptionEnum.PasswordLengthIncorrect.ToString())
.WithErrorCode(nameof(ExceptionEnum.PasswordLengthIncorrect))
.WithMessage(_ => BusinessException.GetMessage(ExceptionEnum.PasswordLengthIncorrect));
RuleFor(r => r.Hardware)
@@ -29,7 +29,7 @@ public class GetResourceRequestValidator : AbstractValidator<GetResourceRequest>
RuleFor(r => r.FileName)
.NotEmpty()
.WithErrorCode(ExceptionEnum.WrongResourceName.ToString())
.WithErrorCode(nameof(ExceptionEnum.WrongResourceName))
.WithMessage(_ => BusinessException.GetMessage(ExceptionEnum.WrongResourceName));
}
}