Skip to content

Commit

Permalink
Renamed method
Browse files Browse the repository at this point in the history
  • Loading branch information
kjetilhau committed Oct 24, 2024
1 parent c2bbab0 commit 183bdca
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task<Guid> Handle(OnboardAppCommand command, CancellationToken canc

try
{
onboardedApp.AddContextTypes(await _contextTypeService.GetContextTypesByContextTypeKey(command.ContextTypes, cancellationToken));
onboardedApp.AddContextTypes(await _contextTypeService.GetAllowedContextTypesByKeys(command.ContextTypes, cancellationToken));
}
catch (InvalidActionException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task<Guid> Handle(UpdateOnboardedAppCommand command, CancellationTo

try
{
entity.AddContextTypes(await _contextTypeService.GetContextTypesByContextTypeKey(command.ContextTypes, cancellationToken));
entity.AddContextTypes(await _contextTypeService.GetAllowedContextTypesByKeys(command.ContextTypes, cancellationToken));
}
catch (InvalidActionException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task<Guid> Handle(CreatePortalCommand command, CancellationToken ca

var portal = new Portal(slug, command.Name, command.ShortName, command.SubText, command.Description, command.Icon);

portal.AddContextTypes(await _contextTypeService.GetContextTypesByContextTypeKey(command.ContextTypes, cancellationToken));
portal.AddContextTypes(await _contextTypeService.GetAllowedContextTypesByKeys(command.ContextTypes, cancellationToken));

await _readWriteContext.Set<Portal>().AddAsync(portal, cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task<Guid> Handle(UpdatePortalCommand command, CancellationToken ca

entity.Update(slug, command.Name, command.ShortName, command.SubText, command.Description, command.Icon);

entity.AddContextTypes(await _contextTypeService.GetContextTypesByContextTypeKey(command.ContextTypes, cancellationToken));
entity.AddContextTypes(await _contextTypeService.GetAllowedContextTypesByKeys(command.ContextTypes, cancellationToken));

await _readWriteContext.SaveChangesAsync(cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public ContextTypeService(IReadWriteContext readWriteContext)
_readWriteContext = readWriteContext;
}

public async Task<IList<ContextType>> GetContextTypesByContextTypeKey(IList<string> contextTypeKeys, CancellationToken cancellationToken)
public async Task<IList<ContextType>> GetAllowedContextTypesByKeys(IList<string> contextTypeKeys, CancellationToken cancellationToken)
{
if (contextTypeKeys.Count == 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ namespace Equinor.ProjectExecutionPortal.Application.Services.ContextTypeService
{
public interface IContextTypeService
{
Task<IList<ContextType>> GetContextTypesByContextTypeKey(IList<string> contextTypeKeys, CancellationToken cancellationToken);
Task<IList<ContextType>> GetAllowedContextTypesByKeys(IList<string> contextTypeKeys, CancellationToken cancellationToken);
}
}

0 comments on commit 183bdca

Please sign in to comment.