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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user