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) {
|
if (type) {
|
||||||
queryBuilder
|
queryBuilder
|
||||||
.where('entities.type', type)
|
.where('entities.type', type)
|
||||||
|
.where((whereBuilder) => {
|
||||||
|
whereBuilder
|
||||||
.where('entities.slug', entityId)
|
.where('entities.slug', entityId)
|
||||||
.orWhere(knex.raw(':entityId = ANY(entities.alias)', { entityId }));
|
.orWhere(knex.raw(':entityId = ANY(entities.alias)', { entityId }));
|
||||||
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue