public override async Task <DeleteVoucherResponse> DeleteDiscount(DeleteDiscountRequest request, ServerCallContext context) { var isVoucherDeleted = await _discountRepository.DeleteVoucher(request.ProductName); return(new DeleteVoucherResponse { Success = isVoucherDeleted }); }
public async Task <ActionResult <bool> > Delete(string productName) { return(Ok(await _repository.DeleteVoucher(productName))); }