Some portal cleanup
This commit is contained in:
@@ -263,7 +263,10 @@ export const app = new Elysia()
|
|||||||
.post("/:id/replay", async ({ params: { id } }) => {
|
.post("/:id/replay", async ({ params: { id } }) => {
|
||||||
const replayed = await s.Events.replay(id);
|
const replayed = await s.Events.replay(id);
|
||||||
if (!replayed) throw new NotFoundError("Event not found or not in a failed state");
|
if (!replayed) throw new NotFoundError("Event not found or not in a failed state");
|
||||||
}, { params: t.Object({ id: t.String() }) })
|
}, {
|
||||||
|
params: t.Object({ id: t.String() })
|
||||||
|
})
|
||||||
|
.get("/groups", async ({ }) => queues.map((q) => q.group))
|
||||||
)
|
)
|
||||||
|
|
||||||
// WEBHOOKS
|
// WEBHOOKS
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
fulfilled: "badge-success",
|
fulfilled: "badge-success",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const groups = (await api.events.groups.get()).data ?? [];
|
||||||
|
|
||||||
let events = $state<EventRow[]>([]);
|
let events = $state<EventRow[]>([]);
|
||||||
let loading = $state(true);
|
let loading = $state(true);
|
||||||
let loadError = $state<string | null>(null);
|
let loadError = $state<string | null>(null);
|
||||||
@@ -122,8 +124,9 @@
|
|||||||
onchange={(e) => setGroup(e.currentTarget.value)}
|
onchange={(e) => setGroup(e.currentTarget.value)}
|
||||||
>
|
>
|
||||||
<option value="">All groups</option>
|
<option value="">All groups</option>
|
||||||
<option value="apparel_sync">Sync</option>
|
{#each groups as group}
|
||||||
<option value="apparel_order">Orders</option>
|
<option value={group}>{formatLabel(group)}</option>
|
||||||
|
{/each}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select
|
<select
|
||||||
|
|||||||
Reference in New Issue
Block a user