diff --git a/package-lock.json b/package-lock.json index d887708f52dc6717998442d119dfd80d053cbc63..bb665abc8324a41a9ab65c4ac3bf224d171d3ec0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "@testing-library/user-event": "^14.5.2", "@testing-library/vue": "^8.0.3", "@tsconfig/node20": "^20.1.4", + "@types/form-data": "^2.5.0", "@types/js-cookie": "^3.0.6", "@types/jsdom": "^21.1.6", "@types/node": "^20.12.5", @@ -1845,6 +1846,16 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/form-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.5.0.tgz", + "integrity": "sha512-23/wYiuckYYtFpL+4RPWiWmRQH2BjFuqCUi2+N3amB1a1Drv+i/byTrGvlLwRVLFNAZbwpbQ7JvTK+VCAPMbcg==", + "deprecated": "This is a stub types definition. form-data provides its own type definitions, so you do not need this installed.", + "dev": true, + "dependencies": { + "form-data": "*" + } + }, "node_modules/@types/js-cookie": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.6.tgz", diff --git a/package.json b/package.json index c7305399cb0eed8bdfd5b03cc45c616a01489e59..3f119b870882bf708f3184abc4cabfaf97048ea9 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@testing-library/user-event": "^14.5.2", "@testing-library/vue": "^8.0.3", "@tsconfig/node20": "^20.1.4", + "@types/form-data": "^2.5.0", "@types/js-cookie": "^3.0.6", "@types/jsdom": "^21.1.6", "@types/node": "^20.12.5", diff --git a/src/api/core/request.ts b/src/api/core/request.ts index 1dc6fef4aab4086ff57b48d26b20ec26bb8fa472..c6716ef792719600ab424d980a6af2796f53fcd5 100644 --- a/src/api/core/request.ts +++ b/src/api/core/request.ts @@ -4,6 +4,7 @@ /* eslint-disable */ import axios from 'axios'; import type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios'; +//@ts-ignore import FormData from 'form-data'; import { ApiError } from './ApiError'; diff --git a/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue b/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue index 1a7a10c84d7ce1c69f9fce9479f6180586cdbbbf..fdd40040bc6141518e62002c4979711cd9f920d6 100644 --- a/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue +++ b/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue @@ -5,7 +5,7 @@ import Button1 from '@/components/Buttons/Button1.vue' import { ref } from 'vue' import { useConfigurationStore } from '@/stores/ConfigurationStore' import { useUserInfoStore } from '@/stores/UserStore' -import { AuthenticationService, OpenAPI, SignUpRequest } from '@/api' +import { AuthenticationService, OpenAPI} from '@/api' import handleUnknownError from '@/components/Exceptions/unkownErrorHandler' const router = useRouter(); @@ -28,7 +28,7 @@ const challenges = ['Make packed lunch', 'Stop shopping', 'Drop coffee', * The first element is the challenge value, and the second element * indicates whether the challenge is checked (true) or unchecked (false). */ -const onChangedChallengeEvent = (value: any) => { +const onChangedChallengeEvent = (value: never) => { // if challenge is checked then add it to the chosenChallenges variable if (value[1]) { chosenChallenges.value.push(value[0]) @@ -104,7 +104,7 @@ const onClick = async () => { </div> <div class="challenge-container"> - <ChallangeCheckBox v-for="(item, index) in challenges" :id="index" :text="item" + <ChallangeCheckBox v-for="(item, index) in challenges" :id="String(index)" :text="item" @challengeChangedEvent="onChangedChallengeEvent" /> </div> diff --git a/types/form-data.d.ts b/types/form-data.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e5597eeceadf947cc15dfda25a56f894e4e77963 --- /dev/null +++ b/types/form-data.d.ts @@ -0,0 +1 @@ +declare module 'form-data'; \ No newline at end of file