Compare commits
2 Commits
074b5a4ae4
...
09b6db6774
| Author | SHA1 | Date | |
|---|---|---|---|
| 09b6db6774 | |||
| be061b956e |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "traxxx-web",
|
||||
"version": "0.46.19",
|
||||
"version": "0.46.20",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.46.19",
|
||||
"version": "0.46.20",
|
||||
"dependencies": {
|
||||
"@brillout/json-serializer": "^0.5.8",
|
||||
"@dicebear/collection": "^7.0.5",
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
"overrides": {
|
||||
"vite": "$vite"
|
||||
},
|
||||
"version": "0.46.19",
|
||||
"version": "0.46.20",
|
||||
"imports": {
|
||||
"#/*": "./*.js"
|
||||
}
|
||||
|
||||
@@ -208,8 +208,16 @@ export function sortActorsByGender(actors, context = {}) {
|
||||
export async function fetchActorsById(actorIds, options = {}, reqUser) {
|
||||
const [actors, profiles, photos, socials, stashes, alerts] = await Promise.all([
|
||||
knex('actors')
|
||||
.select('actors.*')
|
||||
.whereIn('actors.id', actorIds)
|
||||
.modify((builder) => {
|
||||
if (options.order) {
|
||||
builder.orderBy(...options.order);
|
||||
}
|
||||
|
||||
if (!options.shallow) {
|
||||
builder
|
||||
.select(
|
||||
'actors.*',
|
||||
'actors_meta.stashed',
|
||||
knex.raw('row_to_json(avatars) as avatar'),
|
||||
'birth_countries.alpha2 as birth_country_alpha2',
|
||||
@@ -225,13 +233,9 @@ export async function fetchActorsById(actorIds, options = {}, reqUser) {
|
||||
.leftJoin('media as avatars', 'avatars.id', 'actors.avatar_media_id')
|
||||
.leftJoin('media as sfw_media', 'sfw_media.id', 'avatars.sfw_media_id')
|
||||
.leftJoin('entities', 'entities.id', 'actors.entity_id')
|
||||
.whereIn('actors.id', actorIds)
|
||||
.modify((builder) => {
|
||||
if (options.order) {
|
||||
builder.orderBy(...options.order);
|
||||
.groupBy('actors.id', 'avatars.id', 'sfw_media.id', 'entities.id', 'actors_meta.stashed', 'birth_countries.alpha2', 'residence_countries.alpha2');
|
||||
}
|
||||
})
|
||||
.groupBy('actors.id', 'avatars.id', 'sfw_media.id', 'entities.id', 'actors_meta.stashed', 'birth_countries.alpha2', 'residence_countries.alpha2'),
|
||||
}),
|
||||
knex('actors_profiles')
|
||||
.select(
|
||||
'actors_profiles.*',
|
||||
|
||||
Reference in New Issue
Block a user