From 1eae54346f882ac85d526a9534bdffc20f3b3f11 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sun, 3 May 2026 01:30:11 +0000 Subject: [PATCH] feat(frontend-api): add listProjects() to graph API client --- frontend/src/api/graph.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/src/api/graph.js b/frontend/src/api/graph.js index 6fdd2a8f..2f69efe4 100644 --- a/frontend/src/api/graph.js +++ b/frontend/src/api/graph.js @@ -98,3 +98,15 @@ export function deleteProject(projectId) { method: 'delete' }) } + +/** + * Llista tots els projectes (per a la Recovery UI) + * @param {Number} limit - Màxim de projectes a retornar (default 50) + * @returns {Promise} + */ +export function listProjects(limit = 50) { + return service({ + url: `/api/graph/project/list?limit=${limit}`, + method: 'get' + }) +}