Compare commits

..

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian ef852f0191 1.137.6 2020-10-20 21:04:36 +02:00
DebaucheryLibrarian 6791053c83 Fixed entity alias available through wrong type endpoint. 2020-10-20 21:04:29 +02:00
3 changed files with 7 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.137.5", "version": "1.137.6",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.137.5", "version": "1.137.6",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {

View File

@ -141,8 +141,11 @@ async function fetchEntity(entityId, type) {
if (type) { if (type) {
queryBuilder queryBuilder
.where('entities.type', type) .where('entities.type', type)
.where('entities.slug', entityId) .where((whereBuilder) => {
.orWhere(knex.raw(':entityId = ANY(entities.alias)', { entityId })); whereBuilder
.where('entities.slug', entityId)
.orWhere(knex.raw(':entityId = ANY(entities.alias)', { entityId }));
});
return; return;
} }