mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
Rename auth feature to Features.Users (#281)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using MediatR;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.CreateUserProfile;
|
||||
namespace Features.Users.Commands.Profile.CreateUserProfile;
|
||||
|
||||
/// <summary>Creates a new user profile for a user account.</summary>
|
||||
public record CreateUserProfileCommand(Guid UserAccountId, string Biography) : IRequest<Guid>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Features.Auth.Repository;
|
||||
using Features.Users.Repository;
|
||||
using MediatR;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.CreateUserProfile;
|
||||
namespace Features.Users.Commands.Profile.CreateUserProfile;
|
||||
|
||||
/// <summary>Handles <see cref="CreateUserProfileCommand" /> by inserting the new profile record.</summary>
|
||||
public class CreateUserProfileHandler(IUserProfileRepository userProfileRepository)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using MediatR;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.UpdateBiography;
|
||||
namespace Features.Users.Commands.Profile.UpdateBiography;
|
||||
|
||||
/// <summary>Updates the biography of the given user account's profile.</summary>
|
||||
/// <param name="UserAccountId">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Features.Auth.Repository;
|
||||
using Features.Users.Repository;
|
||||
using MediatR;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.UpdateBiography;
|
||||
namespace Features.Users.Commands.Profile.UpdateBiography;
|
||||
|
||||
/// <summary>Handles <see cref="UpdateBiographyCommand" /> by updating the stored biography.</summary>
|
||||
public class UpdateBiographyHandler(IUserProfileRepository userProfileRepository)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Features.Auth.Dtos;
|
||||
using Features.Users.Dtos;
|
||||
using MediatR;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.UpdateProfile;
|
||||
namespace Features.Users.Commands.Profile.UpdateProfile;
|
||||
|
||||
/// <summary>
|
||||
/// Updates the non-credential profile fields (first name, last name, date of birth) of the given
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Domain.Exceptions;
|
||||
using Features.Auth.Dtos;
|
||||
using Features.Auth.Identity;
|
||||
using Features.Users.Dtos;
|
||||
using Features.Users.Identity;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.UpdateProfile;
|
||||
namespace Features.Users.Commands.Profile.UpdateProfile;
|
||||
|
||||
/// <summary>
|
||||
/// Handles <see cref="UpdateProfileCommand" /> via <see cref="UserManager{TUser}" />. First/last name
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.UpdateProfile;
|
||||
namespace Features.Users.Commands.Profile.UpdateProfile;
|
||||
|
||||
/// <summary>Validates <see cref="UpdateProfileCommand" />, mirroring the profile rules in <c>RegisterUserValidator</c>.</summary>
|
||||
public class UpdateProfileValidator : AbstractValidator<UpdateProfileCommand>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.UploadAvatar;
|
||||
namespace Features.Users.Commands.Profile.UploadAvatar;
|
||||
|
||||
/// <summary>Uploads a new avatar photo for a user account, replacing any existing avatar.</summary>
|
||||
public record UploadAvatarCommand(Guid UserAccountId, IFormFile File) : IRequest<Guid>;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Domain.Entities;
|
||||
using Features.Auth.Repository;
|
||||
using Features.ImageUploads.Commands.UploadPhoto;
|
||||
using Features.Users.Repository;
|
||||
using MediatR;
|
||||
|
||||
namespace Features.Auth.Commands.Profile.UploadAvatar;
|
||||
namespace Features.Users.Commands.Profile.UploadAvatar;
|
||||
|
||||
/// <summary>
|
||||
/// Handles <see cref="UploadAvatarCommand" />: uploads the photo via <see cref="UploadPhotoCommand" />,
|
||||
|
||||
Reference in New Issue
Block a user