@@ -89,7 +89,7 @@ const useGameStore = create(
8989 register : async ( username , password ) => {
9090 try {
9191 const response = await axios . post (
92- "http://localhost:4001 /auth/register" ,
92+ "http://localhost:3001 /auth/register" ,
9393 { username, password } ,
9494 { withCredentials : true } ,
9595 ) ;
@@ -103,7 +103,7 @@ const useGameStore = create(
103103 login : async ( username , password ) => {
104104 try {
105105 const response = await axios . post (
106- "http://localhost:4001 /auth/login" ,
106+ "http://localhost:3001 /auth/login" ,
107107 { username, password } ,
108108 { withCredentials : true } ,
109109 ) ;
@@ -117,7 +117,7 @@ const useGameStore = create(
117117 logout : async ( ) => {
118118 try {
119119 await axios . post (
120- "http://localhost:4001 /auth/logout" ,
120+ "http://localhost:3001 /auth/logout" ,
121121 { } ,
122122 { withCredentials : true } ,
123123 ) ;
@@ -174,7 +174,7 @@ const useGameStore = create(
174174 // Update the backend
175175 try {
176176 await axios . post (
177- "http://localhost:4001 /game/update" ,
177+ "http://localhost:3001 /game/update" ,
178178 {
179179 userId : user . id ,
180180 completedPuzzles : newCompletedPuzzles ,
@@ -204,7 +204,7 @@ const useGameStore = create(
204204
205205 try {
206206 await axios . post (
207- "http://localhost:4001 /nft/add" ,
207+ "http://localhost:3001 /nft/add" ,
208208 {
209209 userId : user . id ,
210210 nft,
@@ -227,7 +227,7 @@ const useGameStore = create(
227227
228228 try {
229229 const response = await axios . get (
230- `http://localhost:4001 /users/${ user . id } /inventory/nfts` ,
230+ `http://localhost:3001 /users/${ user . id } /inventory/nfts` ,
231231 {
232232 params : { page, limit } ,
233233 withCredentials : true ,
@@ -264,6 +264,8 @@ const useGameStore = create(
264264
265265 try {
266266 const response = await axios . get (
267+ `http://localhost:3001/user/${ user . id } ` ,
268+ { withCredentials : true }
267269 `http://localhost:4001/user/${ user . id } ` ,
268270 { withCredentials : true } ,
269271 ) ;
@@ -280,7 +282,7 @@ const useGameStore = create(
280282
281283 try {
282284 await axios . post (
283- `http://localhost:4001 /game/reset` ,
285+ `http://localhost:3001 /game/reset` ,
284286 { userId : user . id } ,
285287 { withCredentials : true } ,
286288 ) ;
0 commit comments