chore: cleanup some code
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="17" y="8" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
<rect x="17" y="8" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
||||||
<rect x="2" y="3" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
<rect x="2" y="3" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
||||||
<rect x="2" y="14" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
<rect x="2" y="14" width="5" height="7" rx="1" stroke="currentColor" stroke-width="2"/>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 496 B |
@@ -14,9 +14,6 @@ export const entries: EntryGenerator = async () => {
|
|||||||
|
|
||||||
|
|
||||||
export const GET: RequestHandler = async function GET({ params }) {
|
export const GET: RequestHandler = async function GET({ params }) {
|
||||||
|
|
||||||
const namespaces = await registry.getUser(params.user)
|
const namespaces = await registry.getUser(params.user)
|
||||||
|
|
||||||
return json(namespaces);
|
return json(namespaces);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ export const entries: EntryGenerator = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const GET: RequestHandler = async function GET({ params }) {
|
export const GET: RequestHandler = async function GET({ params }) {
|
||||||
|
|
||||||
const namespaces = await registry.getCollection(`${params.user}/${params.collection}`);
|
const namespaces = await registry.getCollection(`${params.user}/${params.collection}`);
|
||||||
|
|
||||||
return json(namespaces);
|
return json(namespaces);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import * as registry from "$lib/node-registry";
|
|||||||
|
|
||||||
export const prerender = true;
|
export const prerender = true;
|
||||||
|
|
||||||
|
|
||||||
export const entries: EntryGenerator = async () => {
|
export const entries: EntryGenerator = async () => {
|
||||||
const users = await registry.getUsers();
|
const users = await registry.getUsers();
|
||||||
return users.map(user => {
|
return users.map(user => {
|
||||||
@@ -18,9 +17,7 @@ export const entries: EntryGenerator = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const GET: RequestHandler = async function GET({ params }) {
|
export const GET: RequestHandler = async function GET({ params }) {
|
||||||
|
|
||||||
const nodeId = `${params.user}/${params.collection}/${params.node}` as const;
|
const nodeId = `${params.user}/${params.collection}/${params.node}` as const;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const node = await getNode(nodeId);
|
const node = await getNode(nodeId);
|
||||||
return json(node);
|
return json(node);
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ import * as registry from "$lib/node-registry";
|
|||||||
export const prerender = true;
|
export const prerender = true;
|
||||||
|
|
||||||
export const GET: RequestHandler = async function GET() {
|
export const GET: RequestHandler = async function GET() {
|
||||||
|
|
||||||
const users = await registry.getUsers();
|
const users = await registry.getUsers();
|
||||||
|
|
||||||
return json(users);
|
return json(users);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user