injext client

This commit is contained in:
john 2025-05-20 11:47:16 +02:00
parent bc97d009ae
commit 0cbcab6597
5 changed files with 38 additions and 34 deletions

View file

@ -3,14 +3,17 @@ import { setGlobal } from './app/femtoApp.ts'
import { PostsService } from './app/feed/posts/postsService.ts'
import { MediaService } from './app/media/mediaService.ts'
import { AuthService } from './app/auth/authService.ts'
import { initClient } from './app/api/client.ts'
export function initApp() {
setGlobal('version', import.meta.env.VITE_FEMTO_VERSION)
initUser()
const postService = new PostsService()
const mediaService = new MediaService()
const authService = new AuthService()
const client = initClient()
const postService = new PostsService(client)
const mediaService = new MediaService(client)
const authService = new AuthService(client)
return { postService, mediaService, authService }
}