diff options
Diffstat (limited to 'server/controllers/api/overviews.ts')
-rw-r--r-- | server/controllers/api/overviews.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/controllers/api/overviews.ts b/server/controllers/api/overviews.ts index 34585e557..fc616281e 100644 --- a/server/controllers/api/overviews.ts +++ b/server/controllers/api/overviews.ts | |||
@@ -2,16 +2,18 @@ import express from 'express' | |||
2 | import memoizee from 'memoizee' | 2 | import memoizee from 'memoizee' |
3 | import { logger } from '@server/helpers/logger' | 3 | import { logger } from '@server/helpers/logger' |
4 | import { Hooks } from '@server/lib/plugins/hooks' | 4 | import { Hooks } from '@server/lib/plugins/hooks' |
5 | import { getServerActor } from '@server/models/application/application' | ||
5 | import { VideoModel } from '@server/models/video/video' | 6 | import { VideoModel } from '@server/models/video/video' |
6 | import { CategoryOverview, ChannelOverview, TagOverview, VideosOverview } from '../../../shared/models/overviews' | 7 | import { CategoryOverview, ChannelOverview, TagOverview, VideosOverview } from '../../../shared/models/overviews' |
7 | import { buildNSFWFilter } from '../../helpers/express-utils' | 8 | import { buildNSFWFilter } from '../../helpers/express-utils' |
8 | import { MEMOIZE_TTL, OVERVIEWS } from '../../initializers/constants' | 9 | import { MEMOIZE_TTL, OVERVIEWS } from '../../initializers/constants' |
9 | import { asyncMiddleware, optionalAuthenticate, videosOverviewValidator } from '../../middlewares' | 10 | import { apiRateLimiter, asyncMiddleware, optionalAuthenticate, videosOverviewValidator } from '../../middlewares' |
10 | import { TagModel } from '../../models/video/tag' | 11 | import { TagModel } from '../../models/video/tag' |
11 | import { getServerActor } from '@server/models/application/application' | ||
12 | 12 | ||
13 | const overviewsRouter = express.Router() | 13 | const overviewsRouter = express.Router() |
14 | 14 | ||
15 | overviewsRouter.use(apiRateLimiter) | ||
16 | |||
15 | overviewsRouter.get('/videos', | 17 | overviewsRouter.get('/videos', |
16 | videosOverviewValidator, | 18 | videosOverviewValidator, |
17 | optionalAuthenticate, | 19 | optionalAuthenticate, |