@dimitrie so I have a question about the SpeckleView project that is nested in all clients. It appears to me that the data response is coming back in a different format than anticipated. I am getting this back when making a login request:
So basically the login call would always fail to return the token since the property is actually nested under res.data.resource.apitoken notice no camel case.
I am going to guess that rest of the calls are also failing for that reason. Any ideas? I doubt that this is expected behavior.
This is expected behaviour, at least on the response side, see the response base defintion here. resource or resources will be populated based on what api call you request, ie. by id will bring data in resource and a query will bring data in resources.
What I’m worried is that this should’ve been handled in SpeckleView. Did you do a pull? I’m trying to check now branches, but it seems that this was pushed from my side…
When I ran git submodule update --init that pulled the SpeckleCore and SpeckleView. From there on I just ran npm install and npm run build followed by npm run dev so that I can run these in a debug mode.
I had to update that one line in there apiToken = res.data.resource.apitoken because the previous method was calling res.data.apiToken. I am fine fixing that, but I wasn’t sure if that’s what I was supposed to expect here.
i’m also a bit confused but if the latest is ok, is there an issue? this was just a stale submodule problem - which frankly frustrated me previously a lot. Maybe i’m spinning in circles around what you’re telling me though!!!
casing let’s leave it out for now (or flag it in the core and specs), as i think that field was never camelcased’ up. yep, specs confirm it.