news-cms-module 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
// Kirim metadata blok sebagai string JSON (Standar multipart/form-data untuk array of objects)
|
|
287
287
|
formData.append('contentBlocks', JSON.stringify(contentBlocksData));
|
|
288
288
|
try {
|
|
289
|
-
const response = await fetch('
|
|
289
|
+
const response = await fetch('./create', {
|
|
290
290
|
method: 'POST',
|
|
291
291
|
body: formData
|
|
292
292
|
// Jangan set Header Content-Type, browser akan otomatis mengurusnya untuk FormData
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
|
|
298
298
|
if (response.ok && result.success) {
|
|
299
299
|
alert('Berita berhasil disimpan!');
|
|
300
|
-
window.location.href = '
|
|
300
|
+
window.location.href = './list';
|
|
301
301
|
} else {
|
|
302
302
|
alert('Gagal membuat berita: ' + (result.error || 'Terjadi kesalahan server'));
|
|
303
303
|
}
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
formData.append('contentBlocks', JSON.stringify(contentBlocksData));
|
|
335
335
|
|
|
336
336
|
try {
|
|
337
|
-
let url = '
|
|
337
|
+
let url = './update/' + '<%= data.id %>';
|
|
338
338
|
const response = await fetch( url, {
|
|
339
339
|
method: 'PUT',
|
|
340
340
|
body: formData
|