ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix overview endpoint
Chocobozzz8519cc923415
diff --git a/.travis.yml b/.travis.ymlindex 8d61fc10f9..5fa41fb43b 100644--- a/.travis.yml+++ b/.travis.yml@@ -47,7 +47,7 @@ matrix:- env: TEST_SUITE=lintscript:- - NODE_PENDING_JOB_WAIT=1000 travis_retry npm run travis -- "$TEST_SUITE"+ - NODE_PENDING_JOB_WAIT=2000 travis_retry npm run travis -- "$TEST_SUITE"after_failure:- cat test1/logs/peertube.logdiff --git a/server/middlewares/cache.ts b/server/middlewares/cache.tsindex e83d8d569b..091c82d92c 100644--- a/server/middlewares/cache.ts+++ b/server/middlewares/cache.ts@@ -7,6 +7,8 @@ import { logger } from '../helpers/logger'const lock = new AsyncLock({ timeout: 5000 })function cacheRoute (lifetimeArg: string | number) {+ const lifetime = parseDurationToMs(lifetimeArg)+return async function (req: express.Request, res: express.Response, next: express.NextFunction) {const redisKey = Redis.Instance.generateCachedRouteKey(req)@@ -24,7 +26,6 @@ function cacheRoute (lifetimeArg: string | number) {res.send = (body) => {if (res.statusCode >= 200 && res.statusCode < 400) {const contentType = res.get('content-type')- const lifetime = parseDurationToMs(lifetimeArg)Redis.Instance.setCachedRoute(req, body, lifetime, contentType, res.statusCode).then(() => done())diff --git a/server/models/video/video.ts b/server/models/video/video.tsindex 5fb529e8d1..4e6f602aa8 100644--- a/server/models/video/video.ts+++ b/server/models/video/video.ts@@ -207,6 +207,8 @@ type AvailableForListIDsOptions = {followerActorId: numberincludeLocalVideos: boolean+ withoutId?: boolean+filter?: VideoFiltercategoryOneOf?: number[]nsfw?: boolean@@ -268,9 +270,11 @@ type AvailableForListIDsOptions = {return query},[ ScopeNames.AVAILABLE_FOR_LIST_IDS ]: (options: AvailableForListIDsOptions) => {+ const attributes = options.withoutId === true ? [] : [ 'id' ]+const query: FindOptions = {raw: true,- attributes: [ 'id' ],+ attributes,where: {id: {[ Op.and ]: [@@ -1523,7 +1527,8 @@ export class VideoModel extends Model<VideoModel> {const scopeOptions: AvailableForListIDsOptions = {serverAccountId: serverActor.Account.id,followerActorId,- includeLocalVideos: true+ includeLocalVideos: true,+ withoutId: true // Don't break aggregation}const query: FindOptions = {diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.tsindex 55004020fc..dbdd3a8a68 100644--- a/server/tests/api/check-params/contact-form.ts+++ b/server/tests/api/check-params/contact-form.ts@@ -87,6 +87,6 @@ describe('Test contact form API validators', function () {after(async function () {MockSmtpServer.Instance.kill()- // await cleanupTests([ server ])+ await cleanupTests([ server ])})})diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.tsindex 9285682999..e4d817ff8b 100644--- a/server/tests/api/videos/video-playlists.ts+++ b/server/tests/api/videos/video-playlists.ts@@ -5,23 +5,24 @@ import 'mocha'import {addVideoChannel,addVideoInPlaylist,- checkPlaylistFilesWereRemoved, cleanupTests,+ checkPlaylistFilesWereRemoved,+ cleanupTests,createUser,createVideoPlaylist,deleteVideoChannel,deleteVideoPlaylist,- doubleFollow, doVideosExistInMyPlaylist,+ doubleFollow,+ doVideosExistInMyPlaylist,flushAndRunMultipleServers,- flushTests,getAccountPlaylistsList,- getAccountPlaylistsListWithToken, getMyUserInformation,+ getAccountPlaylistsListWithToken,+ getMyUserInformation,getPlaylistVideos,getVideoChannelPlaylistsList,getVideoPlaylist,getVideoPlaylistPrivacies,getVideoPlaylistsList,getVideoPlaylistWithToken,- killallServers,removeUser,removeVideoFromPlaylist,reorderVideosPlaylist,