Recording deletion warning while runs are active

This commit is contained in:
AmitChauhan63390
2024-11-15 16:16:01 +05:30
parent 04ed79b337
commit 8eedca1b1e
5 changed files with 64 additions and 5 deletions

View File

@@ -36,6 +36,8 @@ const ApiKeyManager = () => {
const [copySuccess, setCopySuccess] = useState<boolean>(false);
const { notify } = useGlobalInfoStore();
useEffect(() => {
const fetchApiKey = async () => {
try {
@@ -56,6 +58,7 @@ const ApiKeyManager = () => {
try {
const { data } = await axios.post(`${apiUrl}/auth/generate-api-key`);
setApiKey(data.api_key);
localStorage.setItem('x-api-key', data.api_key);
notify('success', `Generated API Key successfully`);
} catch (error: any) {
notify('error', `Failed to generate API Key - ${error.message}`);