Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 4b9cf25504 0.11.2 2024-03-21 03:27:04 +01:00
DebaucheryLibrarian b034c59d8f Fixed property selection in actors SQL query. 2024-03-21 03:27:01 +01:00
4 changed files with 17 additions and 5 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "traxxx-web",
"version": "0.11.1",
"version": "0.11.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.11.1",
"version": "0.11.2",
"dependencies": {
"@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5",

View File

@ -70,5 +70,5 @@
"postcss-custom-media": "^10.0.2",
"postcss-nesting": "^12.0.2"
},
"version": "0.11.1"
"version": "0.11.2"
}

View File

@ -311,6 +311,7 @@ async function unstash() {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
}
.photo-link {

View File

@ -323,10 +323,18 @@ async function queryManticoreSql(filters, options, _reqUser) {
if (filters.stashId) {
builder.select(knex.raw(`
actors.id as id,
actors.gender as gender,
actors.country as country,
actors.height as height,
actors.weight as weight,
actors.cup as cup,
actors.natural_boobs as natural_boobs,
actors.date_of_birth as date_of_birth,
actors.has_avatar as has_avatar,
actors.scenes as scenes,
actors.stashed as stashed,
created_at as stashed_at
created_at as stashed_at,
if(actors.date_of_birth, floor((now() - actors.date_of_birth) / 31556952), 0) as age
`));
// weight() as _score
@ -370,7 +378,8 @@ async function queryManticoreSql(filters, options, _reqUser) {
}
if (filters.cup) {
builder.where(`regex(cup, '^[${filters.cup[0]}-${filters.cup[1]}]')`, 1);
builder.select(`regex(actors.cup, '^[${filters.cup[0]}-${filters.cup[1]}]') as cup_in_range`);
builder.where('cup_in_range', 1);
}
if (typeof filters.naturalBoobs === 'boolean') {
@ -453,6 +462,8 @@ export async function fetchActors(filters, rawOptions, reqUser) {
const result = await queryManticoreSql(filters, options, reqUser);
// console.log('result', result);
const actorIds = result.actors.map((actor) => Number(actor.id));
const [actors, countries] = await Promise.all([
fetchActorsById(actorIds, {}, reqUser),