tambahan
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user