Spaces:
Sleeping
Sleeping
Commit
Browse files- 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 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 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 |
|