removed unused code
Massimo Melina committed
Jan 2, 2026 at 14:17 UTC
b6394a471c6bebc16c3c23e7bc65dbc7d1a01577
1 file changed
+2
-4
src/serveGuiFiles.ts
+2
-4
@@ -15,7 +15,7 @@ import {
15
enforceStarting, statWithTimeout
16
} from './misc'
17
import { favicon, title } from './adminApis'
18
-import { customHtml, getAllSections, getSection } from './customHtml'
18
+import { getAllSections, getSection } from './customHtml'
19
import _ from 'lodash'
20
import { defineConfig, getConfig } from './config'
21
import { getLangData } from './lang'
@@ -29,9 +29,7 @@ export const logGui = defineConfig(CFG.log_gui, false)
29
_.each(FRONTEND_OPTIONS, (v,k) => defineConfig(k, v)) // define default values
30
31
function serveStatic(uri: string): Koa.Middleware {
32
- const folder = (DEV ? 'dist/' : '') + uri.slice(2,-1) // we know folder is very similar to uri
33
- let cache: Record<string, Promise<string>> = {}
34
- customHtml.emitter.on('change', () => cache = {}) // reset cache at every change
32
+ const folder = (DEV ? 'dist/' : '') + uri.slice(2,-1)
33
return async ctx => {
34
if (!logGui.get())
35
ctx.state.dontLog = true