profile editing finished

This commit is contained in:
2024-11-05 20:04:15 +01:00
Unverified
parent 314fceb120
commit 26a5e1e558
17 changed files with 475 additions and 16 deletions

View File

@@ -0,0 +1,14 @@
using FluentValidation;
using WatchIt.Common.Model.Accounts;
using WatchIt.Database;
namespace WatchIt.WebAPI.Validators.Accounts;
public class AccountProfileBackgroundRequestValidator : AbstractValidator<AccountProfileBackgroundRequest>
{
public AccountProfileBackgroundRequestValidator(DatabaseContext database)
{
RuleFor(x => x.Id).MustBeIn(database.MediaPhotoImages.Where(x => x.MediaPhotoImageBackground != null), x => x.Id)
.WithMessage("Image has to be background");
}
}