Improved profile scrapers. Sorting avatars on actor page by index.

This commit is contained in:
2019-11-21 04:24:55 +01:00
parent 9224b441e2
commit 31a8f1cac1
4 changed files with 13 additions and 3 deletions

View File

@@ -11,7 +11,9 @@ const { createActorMediaDirectory, storeAvatars } = require('./media');
async function curateActor(actor) {
const [aliases, avatars] = await Promise.all([
knex('actors').where({ alias_for: actor.id }),
knex('media').where({ domain: 'actors', target_id: actor.id }),
knex('media')
.where({ domain: 'actors', target_id: actor.id })
.orderBy('index'),
]);
return {