예제 #1
0
        public async Task <string> Handle(MapCreateCommand request, CancellationToken cancellationToken)
        {
            var canOperate = await clientAssetPermissionControlService.CanEditClientAsset();

            if (!canOperate)
            {
                throw new HttpForbiddenException();
            }

            var map = new Map(request.Name, request.Icon, identityService.GetOrganizationId(), identityService.GetUserId());
            await mapRepository.AddAsync(map);

            return(map.Id);
        }