import { jsonError } from "../../common.js";

export async function onRequest(context: RequestContext) {
  const { current_user: currentUser } = context.data;

  if (
    !currentUser ||
    ![
      "165594923586945025",
      "289372404541554689",
      "396347223736057866",
    ].includes(currentUser.id)
  )
    return jsonError("Forbidden", 403);

  return await context.next();
}
