Fix build

This commit is contained in:
Pieter Vander Vennet 2024-08-14 12:42:17 +02:00
parent 13829a89a2
commit e0b8a1c402

View file

@ -172,6 +172,9 @@ export default class ScriptUtils {
headers?: any,
timeoutSecs?: number
): Promise<{ content: string } | { redirect: string } | "timeout"> {
if(url.startsWith("./assets")){
return Promise.resolve({content: readFileSync("./public/"+url, "utf8")})
}
if(url.startsWith("./")){
return Promise.resolve({content: readFileSync(url, "utf8")})
}