aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-05 17:27:24 +0100
committerChocobozzz <me@florianbigard.com>2018-12-05 17:44:34 +0100
commit2feebf3e6afaad9ab80976d1557d3a7bcf94de03 (patch)
tree47df940d7d600cec5e08eb7715bdb5bdae085e59 /server/models/account/account.ts
parent3b3b18203fe73e499bf8b49b15369710df95993e (diff)
downloadPeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.tar.gz
PeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.tar.zst
PeerTube-2feebf3e6afaad9ab80976d1557d3a7bcf94de03.zip
Add sitemap
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r--server/models/account/account.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts
index 5a237d733..a99e9b1ad 100644
--- a/server/models/account/account.ts
+++ b/server/models/account/account.ts
@@ -241,6 +241,27 @@ export class AccountModel extends Model<AccountModel> {
241 }) 241 })
242 } 242 }
243 243
244 static listLocalsForSitemap (sort: string) {
245 const query = {
246 attributes: [ ],
247 offset: 0,
248 order: getSort(sort),
249 include: [
250 {
251 attributes: [ 'preferredUsername', 'serverId' ],
252 model: ActorModel.unscoped(),
253 where: {
254 serverId: null
255 }
256 }
257 ]
258 }
259
260 return AccountModel
261 .unscoped()
262 .findAll(query)
263 }
264
244 toFormattedJSON (): Account { 265 toFormattedJSON (): Account {
245 const actor = this.Actor.toFormattedJSON() 266 const actor = this.Actor.toFormattedJSON()
246 const account = { 267 const account = {