typing indicator, mentions + bug fixes
This commit is contained in:
@@ -48,7 +48,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async signup() {
|
||||
const headers = useRequestHeaders(['cookie']) as Record<string, string>
|
||||
const globalStore = useGlobalStore();
|
||||
if (!this.username || !this.password || !this.email) return;
|
||||
const user = await $fetch('/api/signup', {
|
||||
method: 'post', body: {
|
||||
@@ -56,7 +56,6 @@ export default {
|
||||
email: this.email,
|
||||
password: this.password
|
||||
},
|
||||
headers
|
||||
}) as { userId: string; token: string; user: SafeUser; }
|
||||
|
||||
const userId = useCookie('userId')
|
||||
@@ -64,6 +63,12 @@ export default {
|
||||
const token = useCookie('sessionToken')
|
||||
token.value = user.token
|
||||
|
||||
const headers = { Cookie: `sessionToken=${token.value}`}
|
||||
const { servers, dms } = await $fetch('/api/user/getServers', { headers })
|
||||
|
||||
globalStore.setServers(servers)
|
||||
globalStore.setDms(dms)
|
||||
|
||||
useGlobalStore().setUser(user.user)
|
||||
|
||||
navigateTo('/channel/@me')
|
||||
|
||||
Reference in New Issue
Block a user