Skip to content

Commit

Permalink
fix(core): Fix typing on ProductOptionGroupService.create() method
Browse files Browse the repository at this point in the history
Relates to #2577
  • Loading branch information
michaelbromley committed Feb 26, 2024
1 parent d8648ac commit 8fe24da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export const productDuplicator = new EntityDuplicator({
customFields: translation.customFields,
};
}),
options: [],
});
const options: CreateProductOptionInput[] = optionGroup.options.map(option => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import { RequestContext } from '../../api/common/request-context';
import { ProductOptionGroup } from '../../entity';
import { VendureEntityEvent } from '../vendure-entity-event';

type ProductOptionGroupInputTypes = CreateProductOptionGroupInput | UpdateProductOptionGroupInput | ID;
type ProductOptionGroupInputTypes =
| Omit<CreateProductOptionGroupInput, 'options'>
| UpdateProductOptionGroupInput
| ID;

/**
* @description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class ProductOptionGroupService {

async create(
ctx: RequestContext,
input: CreateProductOptionGroupInput,
input: Omit<CreateProductOptionGroupInput, 'options'>,
): Promise<Translated<ProductOptionGroup>> {
const group = await this.translatableSaver.create({
ctx,
Expand Down

0 comments on commit 8fe24da

Please sign in to comment.