Add user avatar and profile feature, consolidate Auth and UserManagement features (#257)

This commit is contained in:
Aaron Po
2026-08-31 00:11:48 -04:00
committed by GitHub
parent ade2128a73
commit 39c5a89ca7
130 changed files with 1005 additions and 613 deletions

View File

@@ -0,0 +1,12 @@
using Features.Locations.Dtos;
using MediatR;
namespace Features.Locations.Commands.GetOrCreateCity;
/// <summary>
/// Resolves <see cref="City" /> to a City ID, creating the Country, StateProvince, and/or City rows
/// if any part of the chain doesn't exist yet. Sent by other features' handlers (e.g. brewery
/// creation) rather than bound from a request directly, since this feature exposes no controller of
/// its own.
/// </summary>
public record GetOrCreateCityCommand(CityLocation City) : IRequest<Guid>;

View File

@@ -0,0 +1,12 @@
using Features.Locations.Repository;
using MediatR;
namespace Features.Locations.Commands.GetOrCreateCity;
/// <summary>Handles <see cref="GetOrCreateCityCommand" /> by delegating to <see cref="ILocationRepository" />.</summary>
public class GetOrCreateCityHandler(ILocationRepository repository)
: IRequestHandler<GetOrCreateCityCommand, Guid>
{
public Task<Guid> Handle(GetOrCreateCityCommand request, CancellationToken cancellationToken) =>
repository.GetOrCreateCityIdAsync(request.City);
}