10 lines
242 B
TypeScript
10 lines
242 B
TypeScript
import { H3Event, EventHandlerRequest } from "h3";
|
|
export default function (ev: H3Event<EventHandlerRequest>) {
|
|
if (!ev.context.currentUser) {
|
|
throw createError({
|
|
statusCode: 401,
|
|
statusMessage: "Authentication required",
|
|
});
|
|
}
|
|
}
|