8 lines
197 B
TypeScript
8 lines
197 B
TypeScript
import { isLoggedIn } from "../lib/auth.ts";
|
|
import { define } from "../utils.ts";
|
|
|
|
export default define.middleware((ctx) => {
|
|
ctx.state.loggedIn = isLoggedIn(ctx.req);
|
|
return ctx.next();
|
|
});
|