@@ -85,4 +85,13 @@ export const adminApi = {
|
||||
headers: { Authorization: getAuthHeader() },
|
||||
});
|
||||
},
|
||||
|
||||
generateToken: async (label: string): Promise<string> => {
|
||||
const res = await apiClient.post<{ token: string }>(
|
||||
"/agents/register-token",
|
||||
{ label },
|
||||
{ headers: { Authorization: getAuthHeader() } },
|
||||
);
|
||||
return res.data.token;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user