diff --git a/.env b/.env index 8f4c4911..fcdde945 100644 --- a/.env +++ b/.env @@ -7,18 +7,17 @@ # POSTGRES_PASSWORD=pass # POSTGRES_DB=postgreDB # POSTGRES_ROOT_PASSWORD=pass -# POSTGRES_HOST=bess-f2r5s13 +# POSTGRES_HOST=localhost # POSTGRES_HOST_AUTH_METHOD=trust #URL NGINX_ENVSUBST_TEMPLATE_SUFFIX=".conf" -# BASE_URL=http://bess-f2r5s13 -# SOCKET_URL=bess-f2r5s13:8080 -BASE_URL=bess-f2r5s13:8080 -REACT_APP_BASE_URL=bess-f2r5s13:8080 -REDIRECT_URI=http://bess-f2r5s13:8080/api/auth/login -INTRA_URL="https://api.intra.42.fr/oauth/authorize?client_id=u-s4t2ud-2bd3c5d4f41e776f2e3d5d699d2a8421f6d0c0468ec882516d9ca89b0c211789&redirect_uri=http%3A%2F%2Fbess-f2r5s13%3A8080%2Fapi%2Fauth%2Flogin&response_type=code" +# BASE_URL=http://localhost +# SOCKET_URL=localhost:8080 +BASE_URL=localhost:8080 +REACT_APP_BASE_URL=localhost:8080 +REDIRECT_URI=http://localhost:8080/api/auth/login #postgres var # POSTGRES_HOST=127.0.0.1 # DB_TYPE=postgres @@ -35,7 +34,7 @@ NGINX_PORT=8080 PONG_PORT=4000 CHAT_PORT=4001 POSTGRES_PORT=5432 - + #???? RUN_MIGRATIONS=true REACT_HOST=0.0.0.0 @@ -43,6 +42,6 @@ REACT_HOST=0.0.0.0 #auth var JWT_SECRET=secrethere -# REDIRECT_URI=http://bess-f2r5s13:80/api/auth/login -API_SECRET=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 -CLIENT_UID=u-s4t2ud-2bd3c5d4f41e776f2e3d5d699d2a8421f6d0c0468ec882516d9ca89b0c211789 +# REDIRECT_URI=http://localhost:80/api/auth/login +API_SECRET=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 +CLIENT_UID=u-s4t2ud-6d29dfa49ba7146577ffd8bf595ae8d9e5aaa3e0a9615df18777171ebf836a41 diff --git a/containers/api/src/app.controller.ts b/containers/api/src/app.controller.ts index fa3e5a91..19c05aa6 100644 --- a/containers/api/src/app.controller.ts +++ b/containers/api/src/app.controller.ts @@ -451,9 +451,6 @@ export class AppController { @UseGuards(JwtAuthGuard) @Post('/quit') async setOffline(@Request() req) { - console.log("cc quit here"); - const user = await this.userService.findOne(req.user.username); - const user = await this.userService.findOne(req.user.username); user.sessionNumber-- ; if (!user.sessionNumber) diff --git a/containers/react/.env b/containers/react/.env index 0ad277ad..0e54b8cc 100644 --- a/containers/react/.env +++ b/containers/react/.env @@ -1,8 +1,11 @@ -REACT_APP_BASE_URL=bess-f2r5s13:8080 -REACT_APP_SOCKET_URL=bess-f2r5s13 -REACT_APP_API_SECRET=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 -REACT_APP_CLIENT_UID=u-s4t2ud-2bd3c5d4f41e776f2e3d5d699d2a8421f6d0c0468ec882516d9ca89b0c211789 -REACT_APP_INTRA_URL="https://api.intra.42.fr/oauth/authorize?client_id=u-s4t2ud-2bd3c5d4f41e776f2e3d5d699d2a8421f6d0c0468ec882516d9ca89b0c211789&redirect_uri=http%3A%2F%2Fbess-f2r5s13%3A8080%2Fapi%2Fauth%2Flogin&response_type=code" +REACT_APP_BASE_URL=localhost:8080 +REACT_APP_SOCKET_URL=localhost +REACT_APP_API_SECRET=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 +REACT_APP_CLIENT_UID=u-s4t2ud-6d29dfa49ba7146577ffd8bf595ae8d9e5aaa3e0a9615df18777171ebf836a41 # REACT_APP_BASE_URL=92.143.191.152 -# REACT_APP_BASE_URL=192.168.1.19 \ No newline at end of file +# REACT_APP_BASE_URL=192.168.1.19 +REACT_APP_INTRA_URL="https://api.intra.42.fr/oauth/authorize?client_id=u-s4t2ud-6d29dfa49ba7146577ffd8bf595ae8d9e5aaa3e0a9615df18777171ebf836a41&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapi%2Fauth%2Flogin&response_type=code" + +# REACT_APP_BASE_URL=92.143.191.152 +# REACT_APP_BASE_URL=192.168.1.19 diff --git a/containers/react/src/components/App.tsx b/containers/react/src/components/App.tsx index 6c22aa80..ece4ec07 100644 --- a/containers/react/src/components/App.tsx +++ b/containers/react/src/components/App.tsx @@ -40,9 +40,9 @@ function AnimatedRoute () { // Perform your desired actions before the user leaves the page // For example, you can show a confirmation dialog or save user data }; - + window.addEventListener('beforeunload', handleBeforeUnload); - + return () => { window.removeEventListener('beforeunload', handleBeforeUnload); }; @@ -73,7 +73,7 @@ function AnimatedRoute () { }/> }/> }/> - + }/> }/> @@ -94,4 +94,4 @@ function AnimatedRoute () { ) } -export default AnimatedRoute \ No newline at end of file +export default AnimatedRoute diff --git a/containers/react/src/components/Game/PlayButton.tsx b/containers/react/src/components/Game/PlayButton.tsx index 94f323cd..e6bc50ad 100644 --- a/containers/react/src/components/Game/PlayButton.tsx +++ b/containers/react/src/components/Game/PlayButton.tsx @@ -40,13 +40,9 @@ function PlayButton() { {/* !buttonClicked && */}
-<<<<<<< HEAD

Super Power
( w = wall power )

-

Obstacle

-======= +

Super Power

- {/*

Obstacle

*/} ->>>>>>> apommier

Faster and Faster