Fix redirect on CSV upload

This commit is contained in:
Eli Ribble 2026-04-15 18:32:19 +00:00
parent 1097004245
commit 322be2fe40
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View file

@ -275,7 +275,9 @@ const uploadFile = async () => {
const data = await response.json();
uploadSuccess.value = true;
emit("doSuccess", data);
// This is a hack, I should really fix it later
const path = "/_" + data;
emit("doSuccess", path);
resetUpload();
} catch (error) {

View file

@ -121,8 +121,8 @@ function onError(err: Error) {
function onFileSelected(file: File) {
console.log("file selected", file);
}
function onUploadSuccess(data: any) {
console.log("upload success", data);
router.push("/_" + data.uri);
function onUploadSuccess(path: string) {
console.log("custom CSV upload success", path);
router.push(path);
}
</script>