Fixed stash heart not highlighted in search results.
This commit is contained in:
@@ -26,6 +26,14 @@ export function curateEntity(entity, context) {
|
||||
export async function fetchEntities(options) {
|
||||
const entities = await knex('entities')
|
||||
.modify((builder) => {
|
||||
if (options.query) {
|
||||
builder.where((whereBuilder) => {
|
||||
whereBuilder
|
||||
.whereLike('name', options.query)
|
||||
.orWhereLike('slug', options.query);
|
||||
});
|
||||
}
|
||||
|
||||
if (options.type === 'primary') {
|
||||
builder
|
||||
.where('type', 'network')
|
||||
|
||||
@@ -17,6 +17,7 @@ import errorHandler from './error.js';
|
||||
import { fetchScenesApi } from './scenes.js';
|
||||
import { fetchActorsApi } from './actors.js';
|
||||
import { fetchMoviesApi } from './movies.js';
|
||||
import { fetchEntitiesApi } from './entities.js';
|
||||
|
||||
import {
|
||||
setUserApi,
|
||||
@@ -139,6 +140,9 @@ export default async function initServer() {
|
||||
// MOVIES
|
||||
router.get('/api/movies', fetchMoviesApi);
|
||||
|
||||
// ENTITIES
|
||||
router.get('/api/entities', fetchEntitiesApi);
|
||||
|
||||
router.get('*', async (req, res, next) => {
|
||||
const pageContextInit = {
|
||||
urlOriginal: req.originalUrl,
|
||||
|
||||
Reference in New Issue
Block a user