Loading world works

This commit is contained in:
2024-07-12 12:44:37 +02:00
parent 79bef033f3
commit 0fcd5c4d76
20 changed files with 228 additions and 177 deletions

View File

@ -18,7 +18,7 @@ export async function login(username: string, password: string, gameStore = useG
const response = await axios.post(`${config.server_endpoint}/login`, { username, password })
useCookies().set('token', response.data.token as string, {
// for whole domain
domain: window.location.hostname.split('.').slice(-2).join('.'),
domain: window.location.hostname.split('.').slice(-2).join('.')
})
return { success: true, token: response.data.token }
} catch (error: any) {