public async Task <IHttpActionResult> Put(RejectShopCommand command) { command.UserId = UserId; command.FirstName = FirstName; command.LastName = LastName; var response = await Bus.Send <RejectShopCommand, RejectShopCommandResponse>(command); return(Ok(response)); }
public async Task <RejectShopCommandResponse> Handle(RejectShopCommand command) { var shop = _repository.Find(command.Id); if (shop == null) { throw new DomainException("شخص یافت نشد"); } var shopStatusLog = new ShopStatusLog(Guid.NewGuid(), command.UserId, command.FirstName, command.LastName, ShopStatus.Reject); shop.ShopStatus = ShopStatus.Reject; shop.DescriptionStatus = command.DescriptionStatus; shop.ShopStatusLogs.Add(shopStatusLog); await _fcmNotification.SendToIds(shop.GetPushTokens(), "رد تایید فروشگاه", "رد تایید فروشگاه با موفقیت انجام شد", NotificationType.ShopActivated, AppType.Shop, NotificationSound.Shopper); return(new RejectShopCommandResponse()); }