Fixed a few things

Closes #39, #40
This commit is contained in:
2022-10-05 21:34:08 +02:00
parent d5fa2d1522
commit fccb823801
9 changed files with 77 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { TokenInjectType, UploadFile } from '@/api';
import { ref, inject } from 'vue';
import { check_token } from '@/api';
import { update_token } from '@/api';
import UploadEntry from '@/components/UploadDialog/UploadEntry.vue';
import { NCard } from 'naive-ui';
@@ -10,7 +10,7 @@ const jwt = inject<TokenInjectType>('jwt') as TokenInjectType;
const entries = ref<typeof UploadEntry[]>([]);
async function startUpload() {
const token = await check_token(jwt);
const token = await update_token(jwt);
if (!token) return;
const ents: typeof UploadEntry[] = entries.value;
const allProms: Promise<void>[] = [];