2026-08-19 23:25:08 +07:00
|
|
|
using mws.backend.dotnet.application.Common;
|
|
|
|
|
using mws.backend.dotnet.domain.Projects;
|
2026-08-14 08:46:06 +07:00
|
|
|
|
2026-08-19 23:25:08 +07:00
|
|
|
namespace mws.backend.dotnet.application.Projects;
|
2026-08-14 08:46:06 +07:00
|
|
|
|
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
}
|