-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass context back to GetServerProps handler #48
Comments
same issue |
doing this in TS but setup is not passing context object , it is passing req and res object. |
Hello, I have created my own middleware and injector for getServerSideProps and is working fine.
now wrap injector in getServerSideProps and validator on api handler.
|
It works @virendrapatel62 the secret has only one layer so it's not really that safe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, i'm trying to get the
query
from thecontext
argument ofgetServerSideProps
. But i can't achieve this if i follow the example you provided.For
setup
function is passingreq
andres
tohandler
and not the full context object which includesquery
property as well.that function seems to be implemented to work on pages/ on getServerSideProps so is there any point from typing the handler to be
NextApiHandler
instead ofGetServerSideProps
? and how can i get the query property?Thanks.
The text was updated successfully, but these errors were encountered: