Added totp/mail otp, split up dto and api into multiple files

This commit is contained in:
2022-08-24 16:15:33 +02:00
parent af1df3e508
commit cd0d25ba4f
30 changed files with 535 additions and 379 deletions

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { defineProps, defineExpose, ref } from 'vue';
import { isErrorResponse, upload_file } from '@/api';
import { isErrorResponse, FS } from '@/api';
import { NProgress } from 'naive-ui';
import filesize from 'filesize';
@@ -14,7 +14,7 @@ const err = ref('');
const status = ref('info');
async function startUpload(parent: number, token: string) {
const resp = await upload_file(token, parent, props.file, (e) => {
const resp = await FS.upload_file(token, parent, props.file, (e) => {
progress.value = e.loaded;
percentage.value = (e.loaded / e.total) * 100;
});