1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-22 11:34:21 +00:00
This commit is contained in:
Steffo 2020-06-19 17:47:54 +02:00
parent 543dcedb40
commit 58f9b60f0b
Signed by: steffo
GPG key ID: 896A80F55F7C97F0
2 changed files with 5 additions and 2 deletions

View file

@ -1,7 +1,7 @@
import { useContext, useState } from 'preact/hooks';
import RoyalnetInstanceUrl from '../contexts/RoyalnetInstanceUrl';
import useFormValidator from "./useFormValidator";
import apiRequest from '../utils/apiRequest';
import {royalnetApiRequest} from '../utils/royalnetApiRequest';
const instanceUrlRegex = /^https?:\/\/.*?[^/]$/;
@ -33,7 +33,7 @@ export default function() {
let abort = new AbortController();
setInstanceTesterAbort(abort);
apiRequest(value, "GET", "/api/royalnet/version/v1", undefined, abort.signal).then((data) => {
royalnetApiRequest(value, "GET", "/api/royalnet/version/v1", undefined, abort.signal).then((data) => {
if(value === instanceUrl) {
setStatus({
validity: true,

View file

@ -51,6 +51,9 @@ export {
LatexDefaultDisplay,
LatexDefaultInline,
LatexRenderColor,
useFormValidator,
useRoyalnetData,
useRoyalnetInstanceValidator,
theme,
stripTabs,
royalnetApiRequest,