Skip to content

Commit

Permalink
fix(api-core): Allow array for permissions (#67)
Browse files Browse the repository at this point in the history
axi-user-permissions supports queryParms of arrays as so permissionId=1234&permissionId=2345.  Add paramSerializer to override default ,which serializes as brackets (permissionId[]=1234&permissionId[]=2345)

BREAKING CHANGE: The query to the API has been changed. To get the previous behavior, supply a custom paramSerializer.
  • Loading branch information
jsarman authored and TheSharpieOne committed Oct 8, 2018
1 parent c602275 commit 98adf76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/api-core/src/resources/userPermissions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import qs from 'qs';
import AvApi from '../api';

export default class AvUserPermissions extends AvApi {
Expand All @@ -6,6 +7,8 @@ export default class AvUserPermissions extends AvApi {
{
path: 'api/internal',
name: 'axi-user-permissions',
paramsSerializer: params =>
qs.stringify(params, { arrayFormat: 'repeat' }),
},
config
);
Expand Down

0 comments on commit 98adf76

Please sign in to comment.