MMMMMMMMMMMMMMMM types
This commit is contained in:
@@ -29,8 +29,10 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import { NuxtLink } from '~/.nuxt/components';
|
||||
import { useGlobalStore } from '~/stores/store'
|
||||
import { IUser } from '~/types';
|
||||
|
||||
definePageMeta({
|
||||
layout: 'clean'
|
||||
@@ -53,14 +55,14 @@ export default {
|
||||
email: this.email,
|
||||
password: this.password
|
||||
}
|
||||
})
|
||||
}) as { userId: string; token: string; user: IUser; }
|
||||
|
||||
const userId = useCookie('userId')
|
||||
userId.value = user.userId
|
||||
const token = useCookie('sessionToken')
|
||||
token.value = user.token
|
||||
|
||||
useGlobalStore().setUser(user)
|
||||
useGlobalStore().setUser(user.user)
|
||||
|
||||
navigateTo('/channel/@me')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user