mirror of https://github.com/Chocobozzz/PeerTube
Fix join in video events
parent
a041b17147
commit
b869d19068
|
@ -102,15 +102,20 @@ listWithLimitAndRandom = function (limitPods: number, limitRequestsPerPod: numbe
|
||||||
model: RequestVideoEvent['sequelize'].models.Video,
|
model: RequestVideoEvent['sequelize'].models.Video,
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: RequestVideoEvent['sequelize'].models.Author,
|
model: RequestVideoEvent['sequelize'].models.VideoChannel,
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: RequestVideoEvent['sequelize'].models.Pod,
|
model: RequestVideoEvent['sequelize'].models.Author,
|
||||||
where: {
|
include: [
|
||||||
id: {
|
{
|
||||||
$in: podIds
|
model: RequestVideoEvent['sequelize'].models.Pod,
|
||||||
|
where: {
|
||||||
|
id: {
|
||||||
|
$in: podIds
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -138,10 +143,15 @@ removeByRequestIdsAndPod = function (ids: number[], podId: number) {
|
||||||
model: RequestVideoEvent['sequelize'].models.Video,
|
model: RequestVideoEvent['sequelize'].models.Video,
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: RequestVideoEvent['sequelize'].models.Author,
|
model: RequestVideoEvent['sequelize'].models.VideoChannel,
|
||||||
where: {
|
include: [
|
||||||
podId
|
{
|
||||||
}
|
model: RequestVideoEvent['sequelize'].models.Author,
|
||||||
|
where: {
|
||||||
|
podId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue