Skip to content

Commit

Permalink
Merge branch 'main' into Node22asLTS
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy authored Oct 18, 2024
2 parents 03d753d + ac87fd7 commit 163f5a1
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 193 deletions.
3 changes: 3 additions & 0 deletions packages/volto/news/6414.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
URL Management control panel: add a filter for redirects created after a given date.
**Note:** This requires `Products.CMFPlone` 6.0.14 and `plone.restapi` 9.7.3 or later.
@davisagli
16 changes: 9 additions & 7 deletions packages/volto/src/actions/aliases/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ import {
* @param {Object} options Options data.
* @returns {Object} Get aliases action.
*/
export function getAliases(url, options) {
const { query, manual, datetime, batchSize, batchStart } = options || {};
export function getAliases(url, options = {}) {
const { query, batchSize, batchStart, ...rest } = options;
const params = new URLSearchParams({
q: query ?? '',
b_start: batchStart ?? 0,
b_size: batchSize ?? 99999999999,
...rest,
});
return {
type: GET_ALIASES,
request: {
op: 'get',
path: `${url}/@aliases?q=${query ? query : ''}&manual=${
manual ? manual : ''
}&datetime=${datetime !== null ? datetime : ''}&b_size=${
batchSize ? batchSize : 99999999999
}&b_start=${batchStart ? batchStart : 0}`,
path: `${url}/@aliases?${params.toString()}`,
},
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/volto/src/actions/aliases/aliases.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Aliases action', () => {
expect(action.type).toEqual(GET_ALIASES);
expect(action.request.op).toEqual('get');
expect(action.request.path).toEqual(
'/news/@aliases?q=&manual=&datetime=undefined&b_size=99999999999&b_start=0',
'/news/@aliases?q=&b_start=0&b_size=99999999999',
);
});
});
Expand Down
Loading

0 comments on commit 163f5a1

Please sign in to comment.