export default eventHandler((event) => {
	let ahead = (getHeaders(event).authorization || getHeaders(event).Authorization || "")?.replace("Bearer ", "");
	if (event.context.currentUser && ahead) {
		return {
			token: ahead,
			user: event.context.currentUser,
		};
	} else {
		throw createError({ statusCode: 400, message: "unauthenticated" });
	}
});
