diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-05 17:27:24 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-05 17:44:34 +0100 |
commit | 2feebf3e6afaad9ab80976d1557d3a7bcf94de03 (patch) | |
tree | 47df940d7d600cec5e08eb7715bdb5bdae085e59 /server/models/video | |
parent | 3b3b18203fe73e499bf8b49b15369710df95993e (diff) | |
download | PeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.tar.gz PeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.tar.zst PeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.zip |
Add sitemap
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-channel.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index f4586917e..86bf0461a 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts | |||
@@ -233,6 +233,27 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
233 | }) | 233 | }) |
234 | } | 234 | } |
235 | 235 | ||
236 | static listLocalsForSitemap (sort: string) { | ||
237 | const query = { | ||
238 | attributes: [ ], | ||
239 | offset: 0, | ||
240 | order: getSort(sort), | ||
241 | include: [ | ||
242 | { | ||
243 | attributes: [ 'preferredUsername', 'serverId' ], | ||
244 | model: ActorModel.unscoped(), | ||
245 | where: { | ||
246 | serverId: null | ||
247 | } | ||
248 | } | ||
249 | ] | ||
250 | } | ||
251 | |||
252 | return VideoChannelModel | ||
253 | .unscoped() | ||
254 | .findAll(query) | ||
255 | } | ||
256 | |||
236 | static searchForApi (options: { | 257 | static searchForApi (options: { |
237 | actorId: number | 258 | actorId: number |
238 | search: string | 259 | search: string |