framework icon indicating copy to clipboard operation
framework copied to clipboard

AUTH global function is recieving undefined in $.params

Open LandyCuadra opened this issue 5 years ago • 4 comments

Hi, I am having a problem with the AUTH global, I am trying to evaluate some GET routes based on a param they send in the route... but when I try to get the value, I get this error

Cannot destructure property 'clientid' of '$.params' as it is undefined

any idea of what I may be doing wrong?....

LandyCuadra avatar Aug 18 '21 00:08 LandyCuadra

@LandyCuadra. The framework executes the AUTH() method before is evaluated routing because the routing needs information about the result from the AUTH() method.

  • $.params is parsed after routing

petersirka avatar Aug 18 '21 05:08 petersirka

so there si no way to do that?, because the documentation shows I could access those properties..

https://docs.totaljs.com/total4/407ff001jy51c/#4893f001wa51c -> in "+possibilities"

LandyCuadra avatar Aug 18 '21 14:08 LandyCuadra

My mistake. It's fixed. Thank you

petersirka avatar Aug 18 '21 14:08 petersirka

great!, thank you

LandyCuadra avatar Aug 19 '21 12:08 LandyCuadra