diff --git a/frontend/src/stores/search.ts b/frontend/src/stores/search.ts index 4d5883d76b4..c03c6daf29d 100644 --- a/frontend/src/stores/search.ts +++ b/frontend/src/stores/search.ts @@ -114,8 +114,7 @@ export function computeQueryParams( return searchQuery } -// TODO: After the API changes are done, replace -// `tags` with `unstable__tag` +// TODO: Remove `unstable__` parameters after https://github.com/WordPress/openverse/issues/3919 export function buildCollectionQuery( collectionParams: CollectionParams ): PaginatedCollectionQuery { @@ -125,10 +124,10 @@ export function buildCollectionQuery( ...params, ...getSensitiveQuery("API"), unstable__collection: collection, + collection, } if ("tag" in query) { - query.tags = query.tag - delete query.tag + query.unstable__tag = query.tag } return query } diff --git a/frontend/test/tapes/search/images/creator=strogoscope&source=flickr&unstable__collection=creator_keep-alive.json5 b/frontend/test/tapes/search/images/creator=strogoscope&source=flickr&unstable__collection=creator_keep-alive.json5 index c8b2563e25a..a8aef668851 100644 --- a/frontend/test/tapes/search/images/creator=strogoscope&source=flickr&unstable__collection=creator_keep-alive.json5 +++ b/frontend/test/tapes/search/images/creator=strogoscope&source=flickr&unstable__collection=creator_keep-alive.json5 @@ -9,7 +9,7 @@ headers: { connection: 'keep-alive', }, - url: '/v1/images/?creator=strogoscope&source=flickr&unstable__collection=creator', + url: '/v1/images/?creator=strogoscope&source=flickr&unstable__collection=creator&collection=creator', method: 'GET', body: '', }, @@ -1857,4 +1857,4 @@ ], }, }, -} \ No newline at end of file +} diff --git a/frontend/test/tapes/search/images/creator=strogoscope_keep-alive.json5 b/frontend/test/tapes/search/images/creator=strogoscope_keep-alive.json5 index 3a8f2d89d53..29221bc4710 100644 --- a/frontend/test/tapes/search/images/creator=strogoscope_keep-alive.json5 +++ b/frontend/test/tapes/search/images/creator=strogoscope_keep-alive.json5 @@ -9,7 +9,7 @@ headers: { connection: 'keep-alive', }, - url: '/v1/images/?creator=strogoscope%2F+photographer+%3F+creator&source=flickr&unstable__collection=creator', + url: '/v1/images/?creator=strogoscope%2F+photographer+%3F+creator&source=flickr&unstable__collection=creator&collection=creator', method: 'GET', body: '', }, @@ -1857,4 +1857,4 @@ ], }, }, -} \ No newline at end of file +} diff --git a/frontend/test/tapes/search/images/source=flickr&unstable__collection=source_keep-alive.json5 b/frontend/test/tapes/search/images/source=flickr&unstable__collection=source_keep-alive.json5 index e9704940ac0..bd2636b301c 100644 --- a/frontend/test/tapes/search/images/source=flickr&unstable__collection=source_keep-alive.json5 +++ b/frontend/test/tapes/search/images/source=flickr&unstable__collection=source_keep-alive.json5 @@ -9,7 +9,7 @@ headers: { connection: 'keep-alive', }, - url: '/v1/images/?source=flickr&unstable__collection=source', + url: '/v1/images/?source=flickr&unstable__collection=source&collection=source', method: 'GET', body: '', }, @@ -1862,4 +1862,4 @@ ], }, }, -} \ No newline at end of file +} diff --git a/frontend/test/tapes/search/images/unstable__collection=tag&tags=cat_keep-alive.json5 b/frontend/test/tapes/search/images/unstable__collection=tag&tags=cat_keep-alive.json5 index 3f4e45ead91..885a8b36144 100644 --- a/frontend/test/tapes/search/images/unstable__collection=tag&tags=cat_keep-alive.json5 +++ b/frontend/test/tapes/search/images/unstable__collection=tag&tags=cat_keep-alive.json5 @@ -9,7 +9,7 @@ headers: { connection: 'keep-alive', }, - url: '/v1/images/?unstable__collection=tag&tags=cat', + url: '/v1/images/?unstable__collection=tag&unstable_tag=cat&collection=tag&tag=cat', method: 'GET', body: '', }, @@ -961,4 +961,4 @@ ], }, }, -} \ No newline at end of file +}