Closed isaac8069 closed 2 years ago
When I had it working it seemed to be in an infinite loop <---- what did that code look like?
I think it'll be easier to fix the infinite loop than the complete lack of user
I've modified it many times after the infinite loop in an ad hoc way. Hard to explain, but I believe my code is the same. I can't recall how I got it to pull in. I like saved in VSCode, then I refreshed the page on the client, then I hit undo in VSCode and it showed up on the client but in the console.log it kept going up to like 7000+ renders until I hit save again in VSCode to stop the loop
Sure - that's a bummer we don't have that code. Passing the data is one task, fixing an infinite loop is another task. Was hoping we could just do the latter. I'll hop into your room.
Infinite loop and get route resolved!
What stack are you using?
(ex: MERN(mongoose + react), DR(django + react), PEN, etc.)
MERN
What's the problem you're trying to solve?
authorization using token. When I had it working it seemed to be in an infinite loop. I also modified
Bearer${user.token}
toBearer${user}
. Doesn't seem to like any of the many ways I have attempted authorization.Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
401 (Unauthorized)
What is your best guess as to the source of the problem?
token isn't being passed in correctly
What things have you already tried to solve the problem?
various code, saving authorization to a variable and passing it into the getApartments route