Add filters to list of people

This commit is contained in:
hovoodd
2018-10-03 22:15:05 +03:00
parent 7b97a8fca2
commit 67cca7d85d
6 changed files with 122 additions and 55 deletions
+5 -1
View File
@@ -4,7 +4,11 @@ const { SEARCH_OTHER_USERS } = require('../../perms/constants');
const { escapeRegExp } = require('../../services/regex');
const mergeState = (query, state) => {
const { status } = state;
const { role, status } = state;
if (role) {
query.merge({ role });
}
if (status) {
const { username, banned, suspended } = status;
+1
View File
@@ -189,6 +189,7 @@ type UserStatus {
}
input UserStateInput {
role: USER_ROLES
status: UserStatusInput
}