Fix search

This commit is contained in:
soupette 2019-07-26 10:39:51 +02:00
parent fbf5bd851f
commit bdfcdb12b2
2 changed files with 5 additions and 4 deletions

View File

@ -530,7 +530,7 @@ input UserInput {
}
type UsersPermissionsMe {
_id: ID!
id: ID!
username: String!
email: String!
confirmed: Boolean
@ -539,7 +539,7 @@ type UsersPermissionsMe {
}
type UsersPermissionsMeRole {
_id: ID!
id: ID!
name: String!
description: String
type: String

View File

@ -33,11 +33,12 @@ export function* getData({ uid, params }) {
const key =
curr.filter === '=' ? curr.name : `${curr.name}${curr.filter}`;
acc.push(`${key}=${curr.value}`);
return acc;
}, []);
acc.push(filters.join('&'));
if (filters.length > 0) {
acc.push(filters.join('&'));
}
}
return acc;