refactor: formatting
This commit is contained in:
2
backend/src/cache/MangaUpdatesCache.ts
vendored
2
backend/src/cache/MangaUpdatesCache.ts
vendored
@@ -78,11 +78,13 @@ export class MangaUpdatesCache {
|
||||
.filter(([title, entry]) => entry.lastUpdateMs + this.MAX_CACHE_AGE_SEARCH_BY_TITLE < Date.now())
|
||||
.map(([title, entry]) => title);
|
||||
}
|
||||
|
||||
getOutOfDateSeries(): string[] {
|
||||
return Array.from(this._seriesById.entries())
|
||||
.filter(([title, entry]) => entry.lastUpdateMs + this.MAX_CACHE_AGE_SERIES_BY_ID < Date.now())
|
||||
.map(([title, entry]) => title);
|
||||
}
|
||||
|
||||
getOutOfDateSeriesGroups(): string[] {
|
||||
return Array.from(this._seriesGroupsById.entries())
|
||||
.filter(([title, entry]) => entry.lastUpdateMs + this.MAX_CACHE_AGE_SERIES_GROUPS_BY_ID < Date.now())
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as fs from 'fs';
|
||||
import {MangaDexCache} from './cache/MangaDexCache';
|
||||
import mangaDexRouter from './router/MangaDexRouter';
|
||||
|
||||
const config = JSON.parse(fs.readFileSync('config.json').toString())
|
||||
const config = JSON.parse(fs.readFileSync('config.json').toString());
|
||||
|
||||
const app = express();
|
||||
const mangaDexCache = new MangaDexCache();
|
||||
@@ -25,7 +25,7 @@ app.use(express.json());
|
||||
app.use('/anilist', aniListRouter());
|
||||
app.use('/mangadex', mangaDexRouter(mangaDexCache));
|
||||
app.use('/mangaupdates', mangaUpdatesRouter(mangaUpdatesCache));
|
||||
app.use(express.static('_client')) //for production
|
||||
app.use(express.static('_client')); //for production
|
||||
|
||||
//start
|
||||
app.listen(config.port, config.host, () => {
|
||||
|
||||
Reference in New Issue
Block a user