Skip to content

Commit

Permalink
Use different endpoint to upload publication
Browse files Browse the repository at this point in the history
  • Loading branch information
mmihalik committed Dec 14, 2024
1 parent 3b9b4e1 commit 6dcf596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/PublicationUploader/PublicationUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const PublicationUploader: FC<PublicationUploaderProps> = ({semesterId, o
const refetch = () => queryClient.invalidateQueries({queryKey: ['competition', 'semester', semesterId]})

const appendFormData = (formData: FormData) => {
formData.append('publication_type', PublicationTypes.LEAFLET.name)
formData.append('publication_type', PublicationTypes.LEAFLET.id.toString())
formData.append('event', semesterId.toString())
formData.append('order', order.toString())
}
Expand All @@ -37,7 +37,7 @@ export const PublicationUploader: FC<PublicationUploaderProps> = ({semesterId, o
</Link>
)}
<FileUploader
uploadLink={'/api/competition/publication/upload/'}
uploadLink={'/api/competition/publication/'}
acceptedFormats={Accept.Pdf}
adjustFormData={appendFormData}
refetch={refetch}
Expand Down

0 comments on commit 6dcf596

Please sign in to comment.