diff --git a/client/coral-admin/src/routes/Moderation/containers/Moderation.js b/client/coral-admin/src/routes/Moderation/containers/Moderation.js index 167064834..382fd5756 100644 --- a/client/coral-admin/src/routes/Moderation/containers/Moderation.js +++ b/client/coral-admin/src/routes/Moderation/containers/Moderation.js @@ -212,7 +212,7 @@ const withModQueueQuery = withQuery(gql` }) { ...CoralAdmin_Moderation_CommentConnection } - assets: assets(query: {limit: 0}) { + assets { id title url diff --git a/services/assets.js b/services/assets.js index 5a5b924f3..74bc1aa3a 100644 --- a/services/assets.js +++ b/services/assets.js @@ -104,13 +104,12 @@ module.exports = class AssetsService { } /** - * Finds assets matching keywords on the model. If `value` is an empty string, - * then it will not even perform a text search query. + * Finds assets matching keywords on the model. * @param {String} value string to search by. * @return {Promise} */ - static search({value = '', skip = null, limit = null}) { - if (value.length === 0) { + static search({value, skip, limit} = {}) { + if (!value) { return AssetsService.all(skip, limit); } else { return AssetModel