rodrigogs/xvideos

View on GitHub
lib/api/videos/dashboard/createNextFunction.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
const nextFunction = (currentPage) => () => {
  const dashboard = require('./dashboard');
  const next = currentPage + 1;
  return dashboard({ page: next });
};

const createNextFunction = (pagination) => {
  const { page } = pagination;
  return nextFunction(page);
};

module.exports = createNextFunction;