fixed a bunch of bugs, yay!!!

This commit is contained in:
Zoe
2023-01-13 03:34:54 -06:00
parent 3bad12c646
commit c39da0678d
24 changed files with 526 additions and 267 deletions

View File

@@ -37,12 +37,14 @@ export default {
},
methods: {
async signup() {
const headers = useRequestHeaders(['cookie'])
if (!this.username || !this.password) return;
const user = await $fetch('/api/login', {
method: 'post', body: {
username: this.username,
password: this.password
}
},
headers
}) as { userId: string; token: string; user: SafeUser; }
const userId = useCookie('userId')