Skip to content

Commit 3a20f65

Browse files
committed
chore: import CreateVacResponse
1 parent 90e92e2 commit 3a20f65

File tree

1 file changed

+2
-9
lines changed
  • apps/overige-objecten-api/src/controllers/objects

1 file changed

+2
-9
lines changed

apps/overige-objecten-api/src/controllers/objects/create.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import snakeCase from 'lodash.snakecase';
33
import slugify from 'slugify';
44
import { v4 } from 'uuid';
55
import { CREATE_INTERNAL_FIELD, CREATE_KENNISARTIKEL, CREATE_VAC } from '../../queries';
6-
import type { CreateInternalField, CreateProduct, DataVacItem } from '../../strapi-product-type';
6+
import type { CreateInternalField, CreateProduct, CreateVacResponse } from '../../strapi-product-type';
77
import type { components } from '../../types/openapi';
88
import {
99
concatenateFieldValues,
@@ -13,13 +13,6 @@ import {
1313
getTheServerURL,
1414
mapContentByCategory,
1515
} from '../../utils';
16-
type VACData = {
17-
data: {
18-
createVac: {
19-
data: DataVacItem;
20-
};
21-
};
22-
};
2316

2417
const categoryToKeyMap: { [key: string]: string } = {
2518
bewijs: 'bewijs',
@@ -66,7 +59,7 @@ export const createVacController: RequestHandler = async (req, res, next) => {
6659
trefwoorden: vac?.trefwoorden,
6760
},
6861
};
69-
const { data: responseData } = await fetchData<VACData>({
62+
const { data: responseData } = await fetchData<CreateVacResponse>({
7063
url: graphqlURL.href,
7164
query: CREATE_VAC,
7265
variables: { locale, data: vacPayload },

0 commit comments

Comments
 (0)