mirror of
https://github.com/DerTyp7/explainegy-nextjs.git
synced 2026-07-31 15:49:04 +02:00
asd
This commit is contained in:
@@ -44,7 +44,6 @@ export default function AdminCategoriesEditor({ params }: { params: { categoryId
|
||||
async function updateCategory() {
|
||||
console.log("Update category");
|
||||
const payload: UpdateCategory = {
|
||||
id: params.categoryId,
|
||||
title: titleRef.current.value,
|
||||
color: colorRef.current.value,
|
||||
svg: {
|
||||
@@ -54,7 +53,7 @@ export default function AdminCategoriesEditor({ params }: { params: { categoryId
|
||||
};
|
||||
console.log(payload);
|
||||
|
||||
await fetch("/api/categories/", {
|
||||
await fetch(`/api/categories/${params.categoryId.toString()}`, {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
|
||||
Reference in New Issue
Block a user