-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/signer last seen #38
Conversation
Vercel deployment URL: https://signer-metrics-hcxx0jva3-hirosystems.vercel.app 🚀 |
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
fastify.addHook('onSend', async (_req, reply, payload) => { | ||
if ((reply.getHeader('Content-Type') as string).startsWith('application/json')) { | ||
// Pretty-print with indentation | ||
return JSON.stringify(JSON.parse(payload as string), null, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to figure out how to optimize this using fast-json-stringify from fastify, but it doesn't look like it's built-in and would be a bit more complicated to maintain, to avoid the second stringify, as well as the parse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same. I'm just leaving it here for now until we have a better view than the raw json in a web browser :D
🎉 This PR is included in version 0.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closes #24
Closes #23