Small fixes for vue3
This commit is contained in:
parent
05d011f586
commit
878f67b7ff
@ -23,7 +23,11 @@ export async function create(url, password = "", expires = "", unit = "hours") {
|
||||
}
|
||||
let body = "{}";
|
||||
if (password != "" || expires !== "" || unit !== "hours") {
|
||||
body = JSON.stringify({ password: password, expires: expires, unit: unit });
|
||||
body = JSON.stringify({
|
||||
password: password,
|
||||
expires: expires.toString(), // backend expects string not number
|
||||
unit: unit,
|
||||
});
|
||||
}
|
||||
return fetchJSON(url, {
|
||||
method: "POST",
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineAsyncComponent } from "vue";
|
||||
import { files as api } from "@/api";
|
||||
import { mapState, mapActions, mapWritableState } from "pinia";
|
||||
import { useFileStore } from "@/stores/file";
|
||||
@ -43,7 +44,7 @@ export default {
|
||||
Errors,
|
||||
Preview,
|
||||
Listing,
|
||||
Editor: () => import("@/views/files/Editor.vue"),
|
||||
Editor: defineAsyncComponent(() => import("@/views/files/Editor.vue")),
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user