diff --git a/client/tsconfig.json b/client/tsconfig.json index 935e174..a6680fc 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -22,6 +22,9 @@ }, "include": [ "src", - ".eslintrc.js" - ] + ".eslintrc.js", + ], + "files": [ + "uuid.d.ts" + ], } \ No newline at end of file diff --git a/client/uuid.d.ts b/client/uuid.d.ts new file mode 100644 index 0000000..36818a9 --- /dev/null +++ b/client/uuid.d.ts @@ -0,0 +1 @@ +declare module 'uuid'; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ac173aa..220dead 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,6 +53,7 @@ "@types/passport-jwt": "^3.0.7", "@types/passport-local": "^1.0.34", "@types/supertest": "^2.0.12", + "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^5.39.0", "@typescript-eslint/parser": "^5.39.0", "eslint": "^8.25.0", @@ -1910,6 +1911,12 @@ "@types/superagent": "*" } }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", + "dev": true + }, "node_modules/@types/validator": { "version": "13.7.9", "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.9.tgz", @@ -10265,6 +10272,12 @@ "@types/superagent": "*" } }, + "@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", + "dev": true + }, "@types/validator": { "version": "13.7.9", "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.9.tgz", diff --git a/package.json b/package.json index 841fc20..713c2e4 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "build": "tsc", "lint": "eslint src/** --ext .ts", "lint-fix": "eslint src/**/*.ts --fix --max-warnings=0", - "prepare": "husky install", - "postinstall": "cd client && npm i" + "postinstall": "cd client && npm i", + "heroku-postbuild": "npm i --force && cd client && npm run build && cd .. && npm run build" }, "repository": { "type": "git", diff --git a/src/routes/comments.ts b/src/routes/comments.ts index 98f9016..ab25dfe 100644 --- a/src/routes/comments.ts +++ b/src/routes/comments.ts @@ -4,11 +4,7 @@ import { Router } from 'express'; import { isAuth } from '../middlewares/auth.middleware'; const router = Router(); -router.get( - '/posts/:postId/comments', - errorWrapper(isAuth), - errorWrapper(CommentsController.index), -); +router.get('/posts/:postId/comments', errorWrapper(CommentsController.index)); router.post( '/post/:postId/comments', errorWrapper(isAuth), diff --git a/tsconfig.json b/tsconfig.json index 2d4bef6..97ab04a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compileOnSave": false, "compilerOptions": { "skipLibCheck": true, - "strict": true, + "strict": false, "noFallthroughCasesInSwitch": true, "isolatedModules": true, "target": "es2021",