diff --git a/upload-api/.eslintrc.json b/upload-api/.eslintrc.json index 18d8aee21..e6aa0af99 100644 --- a/upload-api/.eslintrc.json +++ b/upload-api/.eslintrc.json @@ -26,6 +26,7 @@ ], "func-names": [0], "@typescript-eslint/no-unused-vars": "warn", + "@typescript-eslint/no-var-requires": "off", "no-prototype-builtins": "off", "@typescript-eslint/no-explicit-any": "off", "no-constant-condition": "off" diff --git a/upload-api/Dockerfile b/upload-api/Dockerfile index 479b82c05..9c6efc1cd 100644 --- a/upload-api/Dockerfile +++ b/upload-api/Dockerfile @@ -8,13 +8,14 @@ WORKDIR /app COPY package*.json ./ # Install application dependencies -RUN npm install +RUN npm install --force # Copy the application code to the container COPY . . # Expose the port your app will run on -EXPOSE 3000 +EXPOSE 4002 # Define the command to run your application -CMD ["node", "index.js"] +CMD ["npm", "start"] + diff --git a/upload-api/src/validators/contentful/index.ts b/upload-api/src/validators/contentful/index.ts index 16a7e6818..6ca438fc3 100644 --- a/upload-api/src/validators/contentful/index.ts +++ b/upload-api/src/validators/contentful/index.ts @@ -14,7 +14,7 @@ function contentfulValidator(data: string): boolean { jsonData = JSON.parse(data); //iterate through jsonconfig to check to check if data is valid - return Object.entries(jsonConfig).every(([key, prop]) => { + return Object.values(jsonConfig).every((prop:any) => { // Check if the current property exists in the json data. if (jsonData?.hasOwnProperty(prop?.name)) { return true;