withSchemaValidation( itemsSchema, ( state = {}, action ) => { switch ( action.type ) { case READER_LISTS_RECEIVE: return Object.assign( {}, state, keyBy( action.lists, 'ID' ) ); case READER_LIST_REQUEST_SUCCESS: case READER_LIST_UPDATE_SUCCESS: return Object.assign( {}, state, keyBy( [ action.data.list ], 'ID' ) ); } return state; } )
router.get('/books', async (req, res) => { try { const books = await Book.list(); res.json(books); } catch (err) { res.json({ error: err.message || err.toString() }); } });
events.on('composeFrameId', function(e, id) { var modal = id && self.props.modal; var list = modal && modal.list; if (list) { for (var i = 0, len = list.length; i < len; i++) { var frame = list[i]; if (frame && frame.frameId === id) { return events.trigger('composeFrame', frame); } } } });
util.request({ url: 'https://w2.w1.test.wildcard5.com/abc/index.html', method: 'post', body: 'sssssss' }, function(res, data) { assert(data.list === undefined); });
it('should throw and error if the given collection does not exist', () => { const collection = gplay.collection.TRENDING; return gplay.list({ collection, num: 100 }) .catch((error) => { assert.equal(error.message, `The collection ${collection} is invalid for the given category, top apps or new apps`); }); });
async _updateMutation({ data }, context) { const gqlName = this.gqlNames.updateAuthenticatedMutationName; if (!context.authedItem || context.authedListKey !== this.list.key) { // Not logged in? Can't update the data throwAccessDenied('mutation', context, gqlName); } await this.checkAccess(context, 'mutation', { gqlName }); return this.list.updateMutation(context.authedItem.id, data, context); }
/** * Get list of registered actions * * @param {object} opts * @returns * @memberof Registry */ getActionList(opts) { return this.actions.list(opts); }
it('should fetch a valid application list for the new free collection and GAME category', () => { return gplay.list({ collection: gplay.collection.NEW_FREE, category: gplay.category.GAME, num: 100 }) .then((apps) => apps.map(assertValidApp)) .then((apps) => apps.map((app) => assert(app.free))); }).timeout(timeout);
modal.list.forEach(function(name) { var item = modal.get(name); var value = item.value || ''; if (item.active) { activeList.push(value); } else if (item.selected) { selectedList.push(value); } else { result.push(value); } });
async updateData() { this.setState({ data: await User.list({ page: this.options.page, size: this.options.sizePerPage }) }) }
it('should fetch a valid application list for the new paid collection', () => { return gplay.list({ collection: gplay.collection.NEW_PAID, num: 100 }) .then((apps) => apps.map(assertValidApp)) .then((apps) => apps.map((app) => assert.isFalse(app.free))); }).timeout(timeout);
router.get('/books', async (req, res) => { try { const books = await Book.list(); res.json(books); } catch (err) { res.json({ error: err.message || err.toString() }); } });
router.get('/books', async (req, res) => { try { const books = await Book.list(); res.json(books); } catch (err) { res.json({ error: err.message || err.toString() }); } });
router.get('/books', async (req, res) => { try { const books = await Book.list(); res.json(books); } catch (err) { res.json({ error: err.message || err.toString() }); } });