mirror of
https://github.com/ArthurDanjou/spanish-learner.git
synced 2026-01-14 20:19:32 +01:00
Working
This commit is contained in:
4
server/api/word.get.ts
Normal file
4
server/api/word.get.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export default defineEventHandler(async () => {
|
||||
const words = await useDB().query.words.findMany()
|
||||
return words[Math.floor(Math.random() * words.length)]
|
||||
})
|
||||
Reference in New Issue
Block a user