fix(unified-search): Send ISO date strings#55478
Conversation
Send expected ISO date string values for `since` and `until`. See : https://github.com/nextcloud/server/blob/3d6699d685215e53ec51b65f491a6aece28e85b1/lib/private/Search/Filter/DateTimeFilter.php#L23 Signed-off-by: nfebe <fenn25.fn@gmail.com>
d41c453 to
d307142
Compare
|
What is sent right now? |
joshtrichards
left a comment
There was a problem hiding this comment.
Seems fine. From what I can tell, the pre-PR behavior already serializes Date params to ISO strings, but only implicitly. It might be worth adjusting the search() contract docs as well, or even instead:
server/core/src/services/UnifiedSearchService.js
Lines 48 to 49 in 13adaf9
e.g.
* @param {string|undefined} options.since ISO datetime string
* @param {string|undefined} options.until ISO datetime stringI was initially confused because the current JSDoc already says only strings are accepted, not Date objects. In practice, though, that seems misleading because the existing behavior relies on implicit serialization. This PR makes that behavior more explicit, which is good, but I’d still suggest the doc update for clarity.
|
/compile |
|
@copilot resolve the merge conflicts in this pull request |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
…ter-format # Conflicts: # core/src/components/UnifiedSearch/UnifiedSearchModal.vue
…nto fix/search-date-filter-format # Conflicts: # dist/core-unified-search.js # dist/core-unified-search.js.map
Done — I resolved the merge conflicts and pushed the updates in commit |
Send expected ISO date string values for
sinceanduntil.See :
server/lib/private/Search/Filter/DateTimeFilter.php
Line 23 in 3d6699d