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