Replaces IProjectService/ProjectService. IProjectMemberService is left in place for now — ProjectMembersController still depends on it until the next task converts it too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
14 lines
414 B
C#
14 lines
414 B
C#
using Mws.Application.Common;
|
|
using Mws.Domain.Projects;
|
|
|
|
namespace Mws.Application.Projects;
|
|
|
|
internal static class ProjectAccess
|
|
{
|
|
public static async Task<Project> GetForUserOrThrowAsync(IUnitOfWork uow, Guid userId, Guid projectId, CancellationToken ct)
|
|
{
|
|
return await uow.Projects.GetForUserAsync(userId, projectId, ct)
|
|
?? throw new NotFoundException("Project not found");
|
|
}
|
|
}
|