Meexa
Explore posts from serversHow to do filepath as a param in an RPC route?
Hey, I've had some time to look into this and I have this endpoint now
.get('/:filepath{.+}?', ...)
Then I can execute this function like so
The problem I have now is since filepath is optional, the filepath
can be undefined
. What happens then is that This request is made
http://localhost:3000/api/folders/undefined?
If I do this { filepath: filepath ?? '' }
then the request is
http://localhost:3000/api/folders/?
Both requests fail. What am I doing wrong?7 replies