Create self-resource middleware

This commit is contained in:
regalijan 2023-10-19 16:51:13 -04:00
parent 78f599ac2c
commit a40665bd6c
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

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();
}