Move queries in file manager to postgres

This commit is contained in:
Guntis Smaukstelis
2023-12-12 15:36:30 +02:00
parent 51ed1e2c7a
commit eaf2788031
6 changed files with 74 additions and 16 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ export const FileContent: Component<{getFileName: Accessor<string>}> = (props) =
const fetchFileContent = async (fileName: string) => {
if (fileName === "") return;
await new Promise(resolve => setTimeout(resolve, 500))
const response = await fetch(`${apiHost}/api/show/file/${fileName}`);
const response = await fetch(`${apiHost}/api/show/datetime/${fileName}`);
const text = await response.json();
return text;
}