shopping-assistant-api/ShoppingAssistantApi.Api/Mutations/WishlistsMutation.cs
2023-11-15 16:54:33 +02:00

30 lines
1.6 KiB
C#

using ShoppingAssistantApi.Application.IServices;
using ShoppingAssistantApi.Application.Models.CreateDtos;
using ShoppingAssistantApi.Application.Models.Dtos;
namespace ShoppingAssistantApi.Api.Mutations;
[ExtendObjectType(OperationTypeNames.Mutation)]
public class WishlistsMutation
{
public Task<WishlistDto> StartPersonalWishlistAsync(WishlistCreateDto dto, CancellationToken cancellationToken,
[Service] IWishlistsService wishlistsService)
=> wishlistsService.StartPersonalWishlistAsync(dto, cancellationToken);
public Task<WishlistDto> GenerateNameForPersonalWishlistAsync(string wishlistId, CancellationToken cancellationToken,
[Service] IWishlistsService wishlistsService)
=> wishlistsService.GenerateNameForPersonalWishlistAsync(wishlistId, cancellationToken);
public Task<MessageDto> AddMessageToPersonalWishlistAsync(string wishlistId, MessageDto dto, CancellationToken cancellationToken,
[Service] IWishlistsService wishlistsService)
=> wishlistsService.AddMessageToPersonalWishlistAsync(wishlistId, dto, cancellationToken);
public Task<ProductDto> AddProductToPersonalWishlistAsync(string wishlistId, ProductCreateDto dto, CancellationToken cancellationToken,
[Service] IWishlistsService wishlistsService)
=> wishlistsService.AddProductToPersonalWishlistAsync(wishlistId, dto, cancellationToken);
public Task<WishlistDto> DeletePersonalWishlistAsync(string wishlistId, CancellationToken cancellationToken,
[Service] IWishlistsService wishlistsService)
=> wishlistsService.DeletePersonalWishlistAsync(wishlistId, cancellationToken);
}