import Boom from 'boom' import { replies } from '@oyst/utils' const { success } = replies const handler = (req, reply) => { const id = req.headers['oyst-session'] if (!id) { return reply(Boom.unauthorized('unauthorized')) } success({ id, user_id: req.headers['oyst-user'] }, reply) } export default { assign: 'session', method: handler }