From cd96ffb75ee6414589db879819d5b8713c905e7d Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Tue, 31 Mar 2026 20:15:54 +0100 Subject: [PATCH] Add FE API functions to generate and delete expert agent credentials --- frontend/src/api/admin.js | 14 +++ frontend/src/pages/admin/Settings/General.vue | 110 +++++++++++++++++- 2 files changed, 123 insertions(+), 1 deletion(-) diff --git a/frontend/src/api/admin.js b/frontend/src/api/admin.js index 60c8fef57b..35cc208d3d 100644 --- a/frontend/src/api/admin.js +++ b/frontend/src/api/admin.js @@ -58,6 +58,18 @@ const deleteStatsAccessToken = async () => { }) } +const generateExpertAgentCreds = async () => { + return client.post('/api/v1/admin/expert-agent-creds', {}).then(res => { + return res.data + }) +} + +const deleteExpertAgentCreds = async () => { + return client.delete('/api/v1/admin/expert-agent-creds').then(res => { + return res.data + }) +} + const getAnnouncementNotifications = async () => { return client.get('/api/v1/admin/announcements') .then(res => { @@ -84,6 +96,8 @@ export default { getPlatformAuditLog, generateStatsAccessToken, deleteStatsAccessToken, + generateExpertAgentCreds, + deleteExpertAgentCreds, getAnnouncementNotifications, sendAnnouncementNotification } diff --git a/frontend/src/pages/admin/Settings/General.vue b/frontend/src/pages/admin/Settings/General.vue index 7a84f10b4f..71524f455f 100644 --- a/frontend/src/pages/admin/Settings/General.vue +++ b/frontend/src/pages/admin/Settings/General.vue @@ -158,6 +158,59 @@ + + Allow Expert agent to connect to the platform + + + + + + + + + + + Enable collection of anonymous statistics