From e1c23acf148d91028b2a5302860c788f533e127c Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Tue, 20 Jan 2026 10:06:28 +0800 Subject: [PATCH] fix login --- components/form/login.tsx | 4 ++-- components/form/product/create-product-form.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/form/login.tsx b/components/form/login.tsx index 15795a6..3790576 100644 --- a/components/form/login.tsx +++ b/components/form/login.tsx @@ -86,7 +86,7 @@ export default function Login() { url: "https://dev.mikulnews.com/auth", userId: profile?.data?.data?.id, }, - response?.data?.data?.access_token + response?.data?.data?.access_token, ); Cookies.set("profile_picture", profile?.data?.data?.profilePictureUrl, { expires: 1, @@ -103,7 +103,7 @@ export default function Login() { Cookies.set("username", profile?.data?.data?.username, { expires: 1, }); - Cookies.set("urie", profile?.data?.data?.roleId, { + Cookies.set("urie", profile?.data?.data?.userRoleId, { expires: 1, }); Cookies.set("roleName", profile?.data?.data?.roleName, { diff --git a/components/form/product/create-product-form.tsx b/components/form/product/create-product-form.tsx index a4b426c..273eb8b 100644 --- a/components/form/product/create-product-form.tsx +++ b/components/form/product/create-product-form.tsx @@ -56,6 +56,7 @@ export default function AddProductForm() { formData.append("title", data.name); formData.append("variant", data.variant); formData.append("is_active", "1"); + formData.append("status", "1"); formData.append("price", data.price.toString()); // if (data.banner && data.banner.length > 0) { // formData.append("thumbnail_path", data.banner[0]);