aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-comment.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-13 17:43:30 +0200
committerChocobozzz <me@florianbigard.com>2018-06-13 18:07:35 +0200
commit9a4a9b6c4e193739d542f73ee85cd305067f2aea (patch)
treedf9b719142dc098764c7a7878a086880b8f9e6bf /server/models/video/video-comment.ts
parent4555697f216e894e5651d8f6d3d971e7d0c17d17 (diff)
downloadPeerTube-9a4a9b6c4e193739d542f73ee85cd305067f2aea.tar.gz
PeerTube-9a4a9b6c4e193739d542f73ee85cd305067f2aea.tar.zst
PeerTube-9a4a9b6c4e193739d542f73ee85cd305067f2aea.zip
Fix offset/limit on some SQL queries :facepalm:
Diffstat (limited to 'server/models/video/video-comment.ts')
-rw-r--r--server/models/video/video-comment.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index 353fb1a0e..86766a5d1 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -329,8 +329,8 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
329 static listAndCountByVideoId (videoId: number, start: number, count: number, t?: Sequelize.Transaction, order: 'ASC' | 'DESC' = 'ASC') { 329 static listAndCountByVideoId (videoId: number, start: number, count: number, t?: Sequelize.Transaction, order: 'ASC' | 'DESC' = 'ASC') {
330 const query = { 330 const query = {
331 order: [ [ 'createdAt', order ] ], 331 order: [ [ 'createdAt', order ] ],
332 start, 332 offset: start,
333 count, 333 limit: count,
334 where: { 334 where: {
335 videoId 335 videoId
336 }, 336 },
@@ -343,8 +343,8 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
343 static listForFeed (start: number, count: number, videoId?: number) { 343 static listForFeed (start: number, count: number, videoId?: number) {
344 const query = { 344 const query = {
345 order: [ [ 'createdAt', 'DESC' ] ], 345 order: [ [ 'createdAt', 'DESC' ] ],
346 start, 346 offset: start,
347 count, 347 limit: count,
348 where: {}, 348 where: {},
349 include: [ 349 include: [
350 { 350 {