How to use the netlify-cms-lib-util.getAllResponses function in netlify-cms-lib-util

To help you get started, we’ve selected a few netlify-cms-lib-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github netlify / netlify-cms / packages / netlify-cms-backend-github / src / API.ts View on Github external
async requestAllPages(url: string, options: Options = {}) {
    // overriding classes can return a promise from requestHeaders
    const headers = await this.requestHeaders(options.headers || {});
    const processedURL = this.urlFor(url, options);
    const allResponses = await getAllResponses(processedURL, { ...options, headers });
    const pages: T[][] = await Promise.all( Response) => this.parseResponse(res)),
    return ([] as T[]).concat(...pages);