[backend/api] Improve remote emoji query
This commit is contained in:
parent
805812110a
commit
026cfa0e82
1 changed files with 2 additions and 4 deletions
|
@ -59,10 +59,8 @@ public class EmojiController(
|
|||
{
|
||||
var res = await db.Emojis
|
||||
.Where(p => p.Host != null
|
||||
&& (!string.IsNullOrWhiteSpace(host) && p.Host.ToLower().Contains(host.ToLower())
|
||||
|| string.IsNullOrWhiteSpace(host))
|
||||
&& (!string.IsNullOrWhiteSpace(name) && p.Name.ToLower().Contains(name.ToLower())
|
||||
|| string.IsNullOrWhiteSpace(name)))
|
||||
&& (string.IsNullOrWhiteSpace(host) || p.Host.ToLower().Contains(host.ToLower()))
|
||||
&& (string.IsNullOrWhiteSpace(name) || p.Name.ToLower().Contains(name.ToLower())))
|
||||
.Select(p => new EmojiResponse
|
||||
{
|
||||
Id = p.Id,
|
||||
|
|
Loading…
Add table
Reference in a new issue