This commit is contained in:
2024-09-02 16:58:23 +02:00
parent c77503ed45
commit 1b0dc0f27d
52 changed files with 817 additions and 1379 deletions

View File

@@ -0,0 +1,19 @@
export default defineEventHandler(async (event) => {
const { username } = await getRouterParams(event)
const user = await useDrizzle()
.query
.users
.findFirst({
where: eq(tables.users.username, username.toLowerCase()),
with: {
categories: {
with: {
tabs: true,
},
},
},
})
return user || {
message: 'User not found',
}
})