From ac0d9f421f1304306d9b3a264a225966fa9d5677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Mon, 29 May 2023 21:49:56 -0600 Subject: IT NOW HAS PAGING. --- src/api/axios_methods.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api') diff --git a/src/api/axios_methods.js b/src/api/axios_methods.js index 822c334..bea8b79 100644 --- a/src/api/axios_methods.js +++ b/src/api/axios_methods.js @@ -126,10 +126,10 @@ export function get_todos_page_function() { export function get_nu_pages_function() { // Return the number of pages in total. // GET "/todos/filtSort/pages" - return async () => { + return async (handler) => { try { const response = await api.get("/todos/filtSort/pages"); - return response.data; + handler(response.data); } catch (err) { console.log(err); } -- cgit v1.2.3