git list refactor
This commit is contained in:
@@ -234,6 +234,21 @@ export const gitService = {
|
||||
return requestApi(`${API_BASE}/repositories/${dashboardId}/status`);
|
||||
},
|
||||
|
||||
/**
|
||||
* [DEF:getStatusesBatch:Function]
|
||||
* @purpose Fetches Git statuses for multiple dashboards in a single request.
|
||||
* @pre dashboardIds must be an array of dashboard IDs.
|
||||
* @post Returns a map of dashboard_id -> status payload.
|
||||
* @param {Array<number>} dashboardIds - Dashboard IDs.
|
||||
* @returns {Promise<Object>} Batch status response.
|
||||
*/
|
||||
async getStatusesBatch(dashboardIds) {
|
||||
console.log(`[getStatusesBatch][Action] Fetching statuses for ${dashboardIds.length} dashboards`);
|
||||
return requestApi(`${API_BASE}/repositories/status/batch`, 'POST', {
|
||||
dashboard_ids: dashboardIds
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* [DEF:getDiff:Function]
|
||||
* @purpose Retrieves the diff for specific files or the whole repository.
|
||||
@@ -256,4 +271,4 @@ export const gitService = {
|
||||
};
|
||||
// [/DEF:gitService:Action]
|
||||
|
||||
// [/DEF:GitServiceClient:Module]
|
||||
// [/DEF:GitServiceClient:Module]
|
||||
|
||||
Reference in New Issue
Block a user