mirror of https://github.com/Chocobozzz/PeerTube
Fix join in video events
parent
a041b17147
commit
b869d19068
|
@ -100,6 +100,9 @@ listWithLimitAndRandom = function (limitPods: number, limitRequestsPerPod: numbe
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: RequestVideoEvent['sequelize'].models.Video,
|
model: RequestVideoEvent['sequelize'].models.Video,
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
model: RequestVideoEvent['sequelize'].models.VideoChannel,
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: RequestVideoEvent['sequelize'].models.Author,
|
model: RequestVideoEvent['sequelize'].models.Author,
|
||||||
|
@ -118,6 +121,8 @@ listWithLimitAndRandom = function (limitPods: number, limitRequestsPerPod: numbe
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
return RequestVideoEvent.findAll(query).then(requests => {
|
return RequestVideoEvent.findAll(query).then(requests => {
|
||||||
const requestsGrouped = groupAndTruncateRequests(requests, limitRequestsPerPod)
|
const requestsGrouped = groupAndTruncateRequests(requests, limitRequestsPerPod)
|
||||||
|
@ -136,6 +141,9 @@ removeByRequestIdsAndPod = function (ids: number[], podId: number) {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: RequestVideoEvent['sequelize'].models.Video,
|
model: RequestVideoEvent['sequelize'].models.Video,
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
model: RequestVideoEvent['sequelize'].models.VideoChannel,
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: RequestVideoEvent['sequelize'].models.Author,
|
model: RequestVideoEvent['sequelize'].models.Author,
|
||||||
|
@ -147,6 +155,8 @@ removeByRequestIdsAndPod = function (ids: number[], podId: number) {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
return RequestVideoEvent.destroy(query)
|
return RequestVideoEvent.destroy(query)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue