WING-NUS / SSID

Student Submission Integrity Diagnosis
18 stars 23 forks source link

Fix issue #370 SSID POST endpoints unable to work with Postman #371

Closed sibinhho99 closed 8 months ago

sibinhho99 commented 8 months ago

Description

Fixes the issue by adding an explicit return in the method to check uploaded file type. curl still works because it does not explicitly specify content type as in Postman. The method is from current web interface's code in app/controllers/assignments_controller.rb; not sure why there's a missing return (linter auto-correction bug or careless mistake).

Postman auto-detected my file type as application/zip (can be manually specified as well), which is in the current list of supported types, so there's no compatibility issue.

Related Issue

Motivation and Context

Fixes https://github.com/WING-NUS/SSID/issues/370

How Has This Been Tested?

Local testing with Postman

Screenshots (if appropriate):

image

Types of changes

Checklist:

coveralls commented 8 months ago

Coverage Status

coverage: 4.124%. remained the same when pulling 55493bec7a8fd043927ef61da38ca24329f8521c on sibinhho99:bugfix into c42fdf273a35cb8ddaea27cfa719f03584920a13 on WING-NUS:master.

huyuxin0429 commented 8 months ago

LGTM