Rollback server side set cookie

This commit is contained in:
2024-08-13 00:52:48 +08:00
parent 1130e6a574
commit 14f2bc0ee6
4 changed files with 12 additions and 6 deletions

View File

@ -16,6 +16,7 @@
<script setup lang="ts">
import { onMounted, ref } from "vue"
import { useRoute, useRouter } from "vue-router"
import { setTokenSet } from "~/stores/userinfo"
const config = useRuntimeConfig()
@ -51,6 +52,8 @@ async function getToken(tk: string) {
error.value = err
throw new Error(err)
} else {
const out = await res.json()
setTokenSet(out["access_token"], out["refresh_token"])
error.value = null
}
}