opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
52 stars 1 forks source link

Similar to the use:enhance error, wretch encountered an error. http://localhost:5175/en/api/ -> 405. #258

Open Tran-Duc-Duy opened 1 week ago

Tran-Duc-Duy commented 1 week ago

const onLogout = async () => { await wretch('/api/auth/logout').post().json(); };

I'm trying to call the logout api of the sveltekit server, but the url has an unwanted prefix "/en" added. And it's rejected by the server. image image I call the POST method, where does the GET method come from? I followed: https://inlang.com/m/dxnzrydw/paraglide-sveltekit-i18n/getting-started

samuelstroschein commented 1 week ago

did you try to exclude the route? https://inlang.com/m/dxnzrydw/paraglide-sveltekit-i18n/advanced-usage#excluding-certain-routes