#Getting target user and a current user from a request while also checking their permissions

8 messages · Page 1 of 1 (latest)

warped oyster
#

depends on what router you're using, but you'd create a middleware to handle the auth

pale umbra
#

you could add an auth middleware

#

and pass the user details in a context for example

random stream
#

also define a struct for the params and for the return type

#

implicit returns could also be useful here to not have to repeat the default initialization

random stream
#

I just mean the second one

random stream
#

you're welcome