From 6f41419c9b680b550ec37d22a6bbea62fbf0eea6 Mon Sep 17 00:00:00 2001 From: chunweii <47494777+chunweii@users.noreply.github.com> Date: Thu, 2 Nov 2023 00:28:14 +0800 Subject: [PATCH] Fix build issues --- frontend/src/pages/profile/[id]/index.tsx | 1 + frontend/src/pages/profile/index.tsx | 1 + frontend/src/pages/questions/new.tsx | 1 + frontend/src/pages/settings/_match.tsx | 3 +- services/admin-service/.gitignore | 64 ++++++++++++++++++ services/gateway/.gitignore | 64 ++++++++++++++++++ .../matching-service/src/swagger-output.json | 66 ++++++++++++++++++- services/user-service/src/swagger-output.json | 23 +++++++ 8 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 services/admin-service/.gitignore create mode 100644 services/gateway/.gitignore diff --git a/frontend/src/pages/profile/[id]/index.tsx b/frontend/src/pages/profile/[id]/index.tsx index 3c2655de..7f0bb304 100644 --- a/frontend/src/pages/profile/[id]/index.tsx +++ b/frontend/src/pages/profile/[id]/index.tsx @@ -35,6 +35,7 @@ export default function Page() { console.log(err); }); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [currentUser]); return ( diff --git a/frontend/src/pages/profile/index.tsx b/frontend/src/pages/profile/index.tsx index 9e5c9253..a8e16192 100644 --- a/frontend/src/pages/profile/index.tsx +++ b/frontend/src/pages/profile/index.tsx @@ -23,6 +23,7 @@ export default function Page() { console.log(err); }); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [currentUser]); return ( diff --git a/frontend/src/pages/questions/new.tsx b/frontend/src/pages/questions/new.tsx index 1a4094e1..af67c160 100644 --- a/frontend/src/pages/questions/new.tsx +++ b/frontend/src/pages/questions/new.tsx @@ -36,6 +36,7 @@ export default function NewQuestion() { if (!currentUser || !isAdmin) { router.push("/"); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [authIsReady, currentUser]) diff --git a/frontend/src/pages/settings/_match.tsx b/frontend/src/pages/settings/_match.tsx index 326fc1a3..a48fb2a8 100644 --- a/frontend/src/pages/settings/_match.tsx +++ b/frontend/src/pages/settings/_match.tsx @@ -32,7 +32,8 @@ export default function MatchSettingsCard() { setIsLoading(false); }); } - }, []) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [currentUser]) useEffect(() => { setUpdatedUser((prev) => ({ ...prev, matchDifficulty: selectedDifficulty })); diff --git a/services/admin-service/.gitignore b/services/admin-service/.gitignore new file mode 100644 index 00000000..ce597ce5 --- /dev/null +++ b/services/admin-service/.gitignore @@ -0,0 +1,64 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Ignore built ts files +dist/**/* + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next diff --git a/services/gateway/.gitignore b/services/gateway/.gitignore new file mode 100644 index 00000000..ce597ce5 --- /dev/null +++ b/services/gateway/.gitignore @@ -0,0 +1,64 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Ignore built ts files +dist/**/* + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next diff --git a/services/matching-service/src/swagger-output.json b/services/matching-service/src/swagger-output.json index 6e329ba1..b5d54982 100644 --- a/services/matching-service/src/swagger-output.json +++ b/services/matching-service/src/swagger-output.json @@ -66,7 +66,71 @@ } } }, - "/api/matching-service/": { + "/api/matching-service/match/{room_id}": { + "get": { + "description": "", + "parameters": [ + { + "name": "room_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "404": { + "description": "Not Found" + } + } + }, + "patch": { + "description": "", + "parameters": [ + { + "name": "room_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + }, + "404": { + "description": "Not Found" + }, + "500": { + "description": "Internal Server Error" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "questionId": { + "example": "any" + } + } + } + } + } + } + } + }, + "/api/matching-service/demo": { "get": { "description": "", "responses": { diff --git a/services/user-service/src/swagger-output.json b/services/user-service/src/swagger-output.json index 3dce4a77..afcf18a9 100644 --- a/services/user-service/src/swagger-output.json +++ b/services/user-service/src/swagger-output.json @@ -120,6 +120,29 @@ } } ], + "responses": { + "200": { + "description": "OK" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/user-service/attempt/{attempt_id}": { + "get": { + "description": "", + "parameters": [ + { + "name": "attempt_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK"