refactor: added support for base url using a shared function
This commit is contained in:
+1
-5
@@ -1,8 +1,4 @@
|
||||
// TODO: move to `shared/` and distinguish client and server (fix imports)
|
||||
|
||||
export function prependBaseUrl(route: string) {
|
||||
return import.meta.env.BASE_URL + (route.startsWith('/') ? route.substring(1) : route)
|
||||
}
|
||||
import { prependBaseUrl } from '../shared/utils'
|
||||
|
||||
export const server = {
|
||||
async get(url: string) {
|
||||
|
||||
Reference in New Issue
Block a user