feat: node store interface

This commit is contained in:
2024-04-20 02:41:18 +02:00
parent 1d203c687c
commit 78c88e4d66
51 changed files with 772 additions and 552 deletions

View File

@@ -0,0 +1,22 @@
import { json } from "@sveltejs/kit";
import type { EntryGenerator, RequestHandler } from "./$types";
import * as registry from "$lib/node-registry";
export const prerender = true;
export const entries: EntryGenerator = async () => {
const users = await registry.getUsers();
return users.map(user => {
return { user: user.id }
}).flat(2);
}
export const GET: RequestHandler = async function GET({ params }) {
const namespaces = await registry.getUser(params.user)
return json(namespaces);
}