14 lines
459 B
C#
14 lines
459 B
C#
using mws.backend.dotnet.application.Common;
|
|
using mws.backend.dotnet.domain.Projects;
|
|
|
|
namespace mws.backend.dotnet.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");
|
|
}
|
|
}
|