Create self-resource middleware

This commit is contained in:
2023-10-19 16:51:13 -04:00
parent 78f599ac2c
commit a40665bd6c

View File

@ -0,0 +1,7 @@
import { jsonError } from "../../common.js";
export async function onRequest(context: RequestContext) {
if (!context.data.current_user) return jsonError("Not logged in", 401);
return await context.next();
}