search: fix server-side dates, add mentionedUsers, referrer, time

QueryDTO.Value being classed as "any" meant DateAttempts would be
unmarshaled as map[string]any, so a custom UnmarshalJSON checks the data
type and unmarshals into a DateAttempt if needed. mentionedUers,
referrer and time matching implemented for activity search. Also, fixed
multi-class queries (e.g. date -and- bool for last-active).
This commit is contained in:
Harvey Tindall
2025-05-26 15:09:40 +01:00
parent 792296e3bc
commit 9715f90a48
4 changed files with 188 additions and 44 deletions
+4 -2
View File
@@ -373,7 +373,8 @@ export class Search {
this._c.search.oninput((null as Event));
};
}
} else if (queryFormat.string) {
}
if (queryFormat.string) {
q = new StringQuery(queryFormat, split[1]);
q.onclick = () => {
@@ -383,7 +384,8 @@ export class Search {
}
this._c.search.oninput((null as Event));
}
} else if (queryFormat.date) {
}
if (queryFormat.date) {
let [parsedDate, op, isDate] = DateQuery.paramsFromString(split[1]);
if (!isDate) continue;
q = new DateQuery(queryFormat, op, parsedDate);