fix(dx): [WIP] auto-generate correctly typed client for any API route 🎉

This commit is contained in:
upsiflu 2025-02-11 20:40:30 +01:00
parent 30493ade84
commit 15bd54ab5f
1 changed files with 2 additions and 1 deletions

View File

@ -82,6 +82,8 @@ const options = {
const privacyLevel = defineModel<keyof typeof options>({ required: true }) const privacyLevel = defineModel<keyof typeof options>({ required: true })
const library = ref<Library>()
// New implementation with `useClient`: // New implementation with `useClient`:
watch(privacyLevel, (newValue) => watch(privacyLevel, (newValue) =>
@ -99,7 +101,6 @@ watch(privacyLevel, (newValue) =>
// Old implementation: // Old implementation:
/* /*
const library = ref<Library>()
watch(privacyLevel, async(newValue) => { try { watch(privacyLevel, async(newValue) => { try {
const response = await axios.get<paths['/api/v2/libraries/']['get']['responses']['200']['content']['application/json']>('libraries/', { const response = await axios.get<paths['/api/v2/libraries/']['get']['responses']['200']['content']['application/json']>('libraries/', {
params: { params: {