forked from DebaucheryLibrarian/traxxx
Fixed entity alias available through wrong type endpoint.
This commit is contained in:
parent
47238b2969
commit
6791053c83
|
@ -141,8 +141,11 @@ async function fetchEntity(entityId, type) {
|
|||
if (type) {
|
||||
queryBuilder
|
||||
.where('entities.type', type)
|
||||
.where('entities.slug', entityId)
|
||||
.orWhere(knex.raw(':entityId = ANY(entities.alias)', { entityId }));
|
||||
.where((whereBuilder) => {
|
||||
whereBuilder
|
||||
.where('entities.slug', entityId)
|
||||
.orWhere(knex.raw(':entityId = ANY(entities.alias)', { entityId }));
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue