Skip to content

Commit

Permalink
fix: fix formdata
Browse files Browse the repository at this point in the history
  • Loading branch information
chowjustin committed Dec 16, 2024
1 parent c7f91a6 commit 2f60aa2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/dashboard/tambah/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ export default function TambahAjuan() {
formData.append("topic", data.topic);
formData.append("cover_letter", data.cover_letter);

formData.append("positions", JSON.stringify(scaledSelections));
scaledSelections.forEach((selection, index) => {
formData.append(`positions[${index}]`, JSON.stringify(selection));
});

if (data.document && data.document[0]) {
formData.append("document", data.document[0]);
Expand Down

0 comments on commit 2f60aa2

Please sign in to comment.