Allowing partial and case-insensitive results from entity and actor search.

This commit is contained in:
DebaucheryLibrarian 2024-05-30 23:54:18 +02:00
parent 099296280c
commit 91643ceac1
2 changed files with 3 additions and 3 deletions

View File

@ -439,7 +439,7 @@ async function createAlert() {
async function searchActors() {
const res = await get('/actors', {
q: actorQuery.value,
q: `${actorQuery.value}*`, // return partial matches
limit: 10,
});

View File

@ -29,8 +29,8 @@ export async function fetchEntities(options) {
if (options.query) {
builder.where((whereBuilder) => {
whereBuilder
.whereLike('name', options.query)
.orWhereLike('slug', options.query);
.whereILike('name', `%${options.query}%`)
.orWhereILike('slug', `%${options.query}%`);
});
}