Fixed entity alias available through wrong type endpoint.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user