mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-09-08 09:15:31 -05:00
Searchlog: Allow searching only a username
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
This commit is contained in:
@@ -871,7 +871,8 @@ export class DatabaseLogSearcher extends Searcher {
|
||||
const results = await Rooms.Roomlogs.table.selectAll()`
|
||||
WHERE ${user ? SQL`userid = ${user} AND ` : SQL``}
|
||||
time BETWEEN ${monthStart}::int::timestamp AND ${monthEnd}::int::timestamp AND
|
||||
type = ${'c'} AND roomid = ${roomid} AND content @@ plainto_tsquery(${search}) LIMIT ${limit}
|
||||
type = ${'c'} AND roomid = ${roomid}
|
||||
${toID(search).length ? SQL` AND content @@ plainto_tsquery(${search})` : SQL``} LIMIT ${limit}
|
||||
`;
|
||||
|
||||
let curDate = '';
|
||||
|
||||
Reference in New Issue
Block a user