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 = "{}";
|
let body = "{}";
|
||||||
if (password != "" || expires !== "" || unit !== "hours") {
|
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, {
|
return fetchJSON(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { defineAsyncComponent } from "vue";
|
||||||
import { files as api } from "@/api";
|
import { files as api } from "@/api";
|
||||||
import { mapState, mapActions, mapWritableState } from "pinia";
|
import { mapState, mapActions, mapWritableState } from "pinia";
|
||||||
import { useFileStore } from "@/stores/file";
|
import { useFileStore } from "@/stores/file";
|
||||||
@ -43,7 +44,7 @@ export default {
|
|||||||
Errors,
|
Errors,
|
||||||
Preview,
|
Preview,
|
||||||
Listing,
|
Listing,
|
||||||
Editor: () => import("@/views/files/Editor.vue"),
|
Editor: defineAsyncComponent(() => import("@/views/files/Editor.vue")),
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user