feat: Add download manager
parent
ee069e9ab8
commit
9268d90979
|
@ -4,4 +4,4 @@ import PackAPI from "../pack_api";
|
|||
export const packRoutes = express.Router();
|
||||
|
||||
packRoutes.get("/packs", PackAPI.getPacks);
|
||||
packRoutes.get("/getpack", PackAPI.downloadSinglePack);
|
||||
packRoutes.get("/getpack", PackAPI.downloadSinglePack);
|
||||
|
|
|
@ -50,5 +50,11 @@ PackService.getInitialList().then(() => {
|
|||
httpServer.listen(PORT, () =>
|
||||
console.log(`The server is running on port ${PORT}`)
|
||||
);
|
||||
console.log('initialized with ',PackService.getPackList().length, 'packs in ', Math.round(performance.now() - start), 'ms')
|
||||
console.log(
|
||||
"initialized with ",
|
||||
PackService.getPackList().length,
|
||||
"packs in ",
|
||||
Math.round(performance.now() - start),
|
||||
"ms"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -60,7 +60,7 @@ export default class PackService {
|
|||
public static findByName = (name: string): Pack | undefined => {
|
||||
for (let i = 0; i < PackService.packList.length; i++) {
|
||||
let pack = PackService.packList[i];
|
||||
|
||||
|
||||
if (pack.name === name) {
|
||||
return pack;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue