added import api reference
Signed-off-by: Ben Hall <ben@benh.codes>
This commit is contained in:
parent
97492174a6
commit
fc8c368bda
@ -1,3 +1,4 @@
|
||||
export const IMPORT_API_URL = env.IMPORT_API_URL || "http://localhost:8083"
|
||||
export const API_URL = env.API_URL || "http://localhost:8081"
|
||||
export const PLACEHOLDER_DOCS_URL = "https://docs.ticketsbot.cloud/setup/placeholders.html"
|
||||
|
||||
|
@ -118,7 +118,7 @@
|
||||
import { setDefaultHeaders } from "../includes/Auth.svelte";
|
||||
import { notify, notifyError, notifySuccess } from "../js/util";
|
||||
import axios from "axios";
|
||||
import { API_URL } from "../js/constants";
|
||||
import { IMPORT_API_URL } from "../js/constants";
|
||||
setDefaultHeaders();
|
||||
|
||||
export let currentRoute;
|
||||
@ -170,7 +170,7 @@
|
||||
}, 60 * 1000);
|
||||
|
||||
if (transcriptFileInput.files.length > 0) {
|
||||
const presignRes = await axios.get(`${API_URL}/api/${guildId}/import/presign?file_size=${transcriptFileInput.files[0].size}`);
|
||||
const presignRes = await axios.get(`${IMPORT_API_URL}/api/${guildId}/import/presign?file_size=${transcriptFileInput.files[0].size}`);
|
||||
if (presignRes.status !== 200) {
|
||||
notifyError(`Failed to upload transcripts: ${presignRes.data.error}`);
|
||||
queryLoading = false;
|
||||
@ -196,7 +196,7 @@
|
||||
|
||||
if (dataFileInput.files.length > 0) {
|
||||
const res = await axios.post(
|
||||
`${API_URL}/api/${guildId}/import`,
|
||||
`${IMPORT_API_URL}/api/${guildId}/import`,
|
||||
frmData,
|
||||
{
|
||||
headers: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user