fix: validate empty endpoints before sending request - resolved #1968
This commit is contained in:
@@ -288,6 +288,11 @@ watch(loading, () => {
|
||||
})
|
||||
|
||||
const newSendRequest = async () => {
|
||||
if (newEndpoint.value === "" || /^\s+$/.test(newEndpoint.value)) {
|
||||
toast.error(`${t("empty.endpoint")}`)
|
||||
return
|
||||
}
|
||||
|
||||
loading.value = true
|
||||
|
||||
// Double calling is because the function returns a TaskEither than should be executed
|
||||
@@ -387,9 +392,7 @@ const copyShareLink = (shareLink: string) => {
|
||||
} else {
|
||||
copyLinkIcon.value = "check"
|
||||
copyToClipboard(`https://hopp.sh/r${shareLink}`)
|
||||
toast.success(`${t("state.copied_to_clipboard")}`, {
|
||||
icon: "content_paste",
|
||||
})
|
||||
toast.success(`${t("state.copied_to_clipboard")}`)
|
||||
setTimeout(() => (copyLinkIcon.value = "copy"), 2000)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Versameling is leeg",
|
||||
"collections": "Versamelings is leeg",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Omgewings is leeg",
|
||||
"folder": "Vouer is leeg",
|
||||
"headers": "Hierdie versoek bevat geen opskrifte nie",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "المجموعة فارغة",
|
||||
"collections": "المجموعات فارغة",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "البيئات فارغة",
|
||||
"folder": "مجلد فارغ",
|
||||
"headers": "لا يحتوي هذا الطلب على أية رؤوس",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "La col·lecció està buida",
|
||||
"collections": "Les col·leccions estan buides",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Els entorns estan buits",
|
||||
"folder": "La carpeta està buida",
|
||||
"headers": "Aquesta sol·licitud no té cap capçalera",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "组合为空",
|
||||
"collections": "组合为空",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "环境为空",
|
||||
"folder": "文件夹为空",
|
||||
"headers": "该请求没有任何请求头",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Sbírka je prázdná",
|
||||
"collections": "Sbírky jsou prázdné",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Prostředí je prázdné",
|
||||
"folder": "Složka je prázdná",
|
||||
"headers": "Tento požadavek nemá žádná záhlaví",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Samlingen er tom",
|
||||
"collections": "Samlinger er tomme",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Miljøer er tomme",
|
||||
"folder": "Mappen er tom",
|
||||
"headers": "Denne anmodning har ingen overskrifter",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Sammlung ist leer",
|
||||
"collections": "Sammlungen sind leer",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Umgebungen sind leer",
|
||||
"folder": "Der Ordner ist leer",
|
||||
"headers": "Diese Anfrage hat keine Header",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Η συλλογή είναι άδεια",
|
||||
"collections": "Οι συλλογές είναι άδειες",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Τα περιβάλλοντα είναι άδεια",
|
||||
"folder": "Ο φάκελος είναι άδειος",
|
||||
"headers": "Αυτό το αίτημα δεν έχει κεφαλίδες",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Collection is empty",
|
||||
"collections": "Collections are empty",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Environments are empty",
|
||||
"folder": "Folder is empty",
|
||||
"headers": "This request does not have any headers",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "La colección está vacía",
|
||||
"collections": "Las colecciones están vacías",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Los entornos están vacíos",
|
||||
"folder": "La carpeta está vacía",
|
||||
"headers": "Esta petición no tiene encabezados",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Kokoelma on tyhjä",
|
||||
"collections": "Kokoelmat ovat tyhjiä",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Ympäristöt ovat tyhjiä",
|
||||
"folder": "Kansio on tyhjä",
|
||||
"headers": "Tässä pyynnössä ei ole otsikoita",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "La collection est vide",
|
||||
"collections": "Les collections sont vides",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Les environnements sont vides",
|
||||
"folder": "Le dossier est vide",
|
||||
"headers": "Cette requête n'a pas d'en-tête",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "האוסף ריק",
|
||||
"collections": "האוספים ריקים",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "הסביבה ריקה",
|
||||
"folder": "התיקייה ריקה",
|
||||
"headers": "לבקשה זו אין כותרות",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "A gyűjtemény üres",
|
||||
"collections": "A gyűjtemények üresek",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "A környezet üres",
|
||||
"folder": "A mappa üres",
|
||||
"headers": "Ennek a kérésnek nincs fejléce",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "La raccolta è vuota",
|
||||
"collections": "Le raccolte sono vuote",
|
||||
"documentation": "Connetti ad un endpoint GraphQL per mostrare la documentazione",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Gli ambienti sono vuoti",
|
||||
"folder": "La cartella è vuota",
|
||||
"headers": "Questa richiesta non ha intestazioni",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "コレクションは空です",
|
||||
"collections": "コレクションは空です",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "環境は空です",
|
||||
"folder": "フォルダが空です",
|
||||
"headers": "このリクエストにはヘッダーがありません",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "모음집이 비어 있습니다.",
|
||||
"collections": "모음집이 비어 있습니다.",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "환경이 비어 있습니다.",
|
||||
"folder": "폴더가 비어 있습니다.",
|
||||
"headers": "이 요청에는 헤더가 없습니다.",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Collectie is leeg",
|
||||
"collections": "Collecties zijn leeg",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Omgevingen zijn leeg",
|
||||
"folder": "Map is leeg",
|
||||
"headers": "Dit verzoek heeft geen headers",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Samlingen er tom",
|
||||
"collections": "Samlingene er tomme",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Miljøer er tomme",
|
||||
"folder": "Mappen er tom",
|
||||
"headers": "Denne forespørselen har ingen overskrifter",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Kolekcja jest pusta",
|
||||
"collections": "Kolekcje są puste",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Środowiska są puste",
|
||||
"folder": "Folder jest pusty",
|
||||
"headers": "To żądanie nie ma żadnych nagłówków",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Coleção está vazia",
|
||||
"collections": "Coleções estão vazias",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Ambientes estão vazios",
|
||||
"folder": "Pasta está vazia",
|
||||
"headers": "Esta solicitação não possui cabeçalhos",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Coleção está vazia",
|
||||
"collections": "Coleções estão vazias",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Ambientes estão vazios",
|
||||
"folder": "Pasta está vazia",
|
||||
"headers": "Esta solicitação não possui cabeçalhos",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Colecția este goală",
|
||||
"collections": "Colecțiile sunt goale",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Mediile sunt goale",
|
||||
"folder": "Dosarul este gol",
|
||||
"headers": "Această solicitare nu are anteturi",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Коллекция пуста",
|
||||
"collections": "Коллекции пустые",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Окружения пусты",
|
||||
"folder": "Папка пуста",
|
||||
"headers": "У этого запроса нет заголовков",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Збирка је празна",
|
||||
"collections": "Збирке су празне",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Окружења су празна",
|
||||
"folder": "Мапа је празна",
|
||||
"headers": "Овај захтев нема заглавља",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Samlingen är tom",
|
||||
"collections": "Samlingar är tomma",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Miljöer är tomma",
|
||||
"folder": "Mappen är tom",
|
||||
"headers": "Denna begäran har inga rubriker",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Koleksiyon boş",
|
||||
"collections": "Koleksiyonlar boş",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Ortamlar boş",
|
||||
"folder": "Klasör boş",
|
||||
"headers": "Bu isteğin herhangi bir başlığı yok",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "組合為空",
|
||||
"collections": "組合為空",
|
||||
"documentation": "連接至 GraphQL 端點以檢視文檔",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "環境為空",
|
||||
"folder": "資料夾為空",
|
||||
"headers": "該請求沒有任何請求頭",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Колекція порожня",
|
||||
"collections": "Колекції порожні",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Середовища порожні",
|
||||
"folder": "Папка порожня",
|
||||
"headers": "Цей запит не має заголовків",
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"collection": "Bộ sưu tập trống",
|
||||
"collections": "Bộ sưu tập trống",
|
||||
"documentation": "Connect to a GraphQL endpoint to view documentation",
|
||||
"endpoint": "Endpoint cannot be empty",
|
||||
"environments": "Môi trường trống",
|
||||
"folder": "Tệp này rỗng",
|
||||
"headers": "Yêu cầu này không có bất kỳ tiêu đề nào",
|
||||
|
||||
Reference in New Issue
Block a user