Skip to content

Commit

Permalink
Use different endpoint to upload publication (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmihalik authored Dec 14, 2024
1 parent 500385b commit 8c70bf1
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 8c70bf1

Please sign in to comment.