Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Access to res.locals in Sapper store #344

Closed
briancray opened this issue Aug 6, 2018 · 2 comments · Fixed by #350
Closed

Access to res.locals in Sapper store #344

briancray opened this issue Aug 6, 2018 · 2 comments · Fixed by #350

Comments

@briancray
Copy link

I noticed you have access to a req object in the server side Sapper middleware, but I'd love to see access to res.locals, which is where we traditionally store stuff to be rendered to the view. We have several middleware that add information to res.locals as the request travels through our response pipeline.

@Rich-Harris
Copy link
Member

Yeah, that sounds like a good idea, thanks. Would you be up for making a pull request? I think it'd just be a case of changing this line (and the associated TypeScript declarations) and augmenting/adapting this test.

@briancray
Copy link
Author

This is great, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants