Clearly mark frontend fetches

This commit is contained in:
Enrico Ros
2024-02-17 15:30:35 -08:00
parent 5bb84f8930
commit 8299b4c148
5 changed files with 13 additions and 7 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import SchemaIcon from '@mui/icons-material/Schema';
import ShapeLineOutlinedIcon from '@mui/icons-material/ShapeLineOutlined';
import { copyToClipboard } from '~/common/util/clipboardUtils';
import { frontendSideFetch } from '~/common/util/clientFetchers';
import type { CodeBlock } from '../blocks';
import { ButtonCodePen, isCodePenSupported } from './ButtonCodePen';
@@ -28,7 +29,7 @@ async function fetchPlantUmlSvg(plantUmlCode: string): Promise<string | null> {
// retrieve and manually adapt the SVG, to remove the background
const encodedPlantUML: string = plantUmlEncode(plantUmlCode);
const response = await fetch(`https://www.plantuml.com/plantuml/svg/${encodedPlantUML}`);
const response = await frontendSideFetch(`https://www.plantuml.com/plantuml/svg/${encodedPlantUML}`);
text = await response.text();
} catch (e) {
return null;