export async function onRequestGet(context: RequestContext) {
  const list = await context.env.DATA.list({ prefix: "gamemod_" });
  const entries = [];

  for (const key of list.keys)
    entries.push({
      metadata: key.metadata,
      user: key.name.replace("gamemod_", ""),
    });

  return new Response(JSON.stringify(entries), {
    headers: {
      "content-type": "application/json",
    },
  });
}
