feat: (web) add quest table component for admin quests page

- Add getAllQuests() method to quest.service.ts
- Add GET /api/quests endpoint to server.ts
- Create QuestTable component with data display, formatting, and states
- Update AdminQuests.tsx to fetch and display quests above the form
- Add onSuccess callback to QuestForm for refresh handling
This commit is contained in:
syntaxbullet
2026-01-16 15:12:41 +01:00
parent d243a11bd3
commit 3ef9773990
5 changed files with 377 additions and 2 deletions

View File

@@ -162,5 +162,11 @@ export const questService = {
})
.returning();
}, tx);
},
async getAllQuests() {
return await DrizzleClient.query.quests.findMany({
orderBy: (quests, { asc }) => [asc(quests.id)],
});
}
};