Franek-Le commited on
Commit
60c1a52
·
1 Parent(s): ff4dde7
Files changed (1) hide show
  1. src/mods/mods.ts +7 -5
src/mods/mods.ts CHANGED
@@ -22,11 +22,13 @@ export class ModManager {
22
  res.send(typia.json.stringify(mods));
23
  })
24
 
25
- for (const mod of mods) {
26
- this.server.get(`/files/mods/${mod.filename}`, (_req, res) => {
27
- const filepath = path.join(this.root, "files", "mods", mod.filename)
28
- res.download(filepath);
29
- })
 
 
30
  }
31
  }
32
 
 
22
  res.send(typia.json.stringify(mods));
23
  })
24
 
25
+ if (mods.length > 0) {
26
+ for (const mod of mods) {
27
+ this.server.get(`/files/mods/${mod.filename}`, (_req, res) => {
28
+ const filepath = path.join(this.root, "files", "mods", mod.filename)
29
+ res.download(filepath);
30
+ })
31
+ }
32
  }
33
  }
34