Spaces:
Sleeping
Sleeping
Commit
Browse files- src/mods/mods.ts +2 -2
src/mods/mods.ts
CHANGED
|
@@ -23,14 +23,14 @@ export class ModManager {
|
|
| 23 |
|
| 24 |
for (const mod of mods) {
|
| 25 |
this.server.get(`/files/mods/${mod.filename}`, (_req, res) => {
|
| 26 |
-
const filepath = path.join(this.root, "mods", mod.filename)
|
| 27 |
res.download(filepath);
|
| 28 |
})
|
| 29 |
}
|
| 30 |
}
|
| 31 |
|
| 32 |
private async getModList(): Promise<Mod[]> {
|
| 33 |
-
const modFolderPath = path.join(this.root, "mods");
|
| 34 |
|
| 35 |
const filenames = await readdir(modFolderPath);
|
| 36 |
|
|
|
|
| 23 |
|
| 24 |
for (const mod of mods) {
|
| 25 |
this.server.get(`/files/mods/${mod.filename}`, (_req, res) => {
|
| 26 |
+
const filepath = path.join(this.root, "files", "mods", mod.filename)
|
| 27 |
res.download(filepath);
|
| 28 |
})
|
| 29 |
}
|
| 30 |
}
|
| 31 |
|
| 32 |
private async getModList(): Promise<Mod[]> {
|
| 33 |
+
const modFolderPath = path.join(this.root, "files", "mods");
|
| 34 |
|
| 35 |
const filenames = await readdir(modFolderPath);
|
| 36 |
|