This commit is contained in:
bipproduction
2025-11-24 10:32:38 +08:00
parent fdd0388168
commit 0a8969280e

View File

@@ -39,7 +39,7 @@ function CreateApiKey() {
try { try {
setLoading(true); setLoading(true);
if (!name || !description || !expiredAt) { if (!name || !description ) {
showNotification({ showNotification({
title: "Error", title: "Error",
message: "All fields are required", message: "All fields are required",
@@ -48,10 +48,11 @@ function CreateApiKey() {
return; return;
} }
const res = await apiFetch.api.apikey.create.post({ const res = await apiFetch.api.apikey.create.post({
name, name,
description, description,
expiredAt, expiredAt: expiredAt ? new Date(expiredAt).toISOString() : new Date().toISOString(),
}); });
if (res.status === 200) { if (res.status === 200) {