WING-NUS / SSID

Student Submission Integrity Diagnosis
18 stars 23 forks source link

🐛 Bugs of submission similarities #index and #show GET API routes #350

Open sibinhho99 opened 1 year ago

sibinhho99 commented 1 year ago

Cc:

Hi

Describe the Bug

(Via API)

To Reproduce

Steps to reproduce the behavior:

  1. Try to hit the described routes using an API client
  2. Errors shown

Expected Behavior

Tasks

Acceptance Criteria

More Information

In this line for show route we should use id instead of submission_similarity_id https://github.com/WING-NUS/SSID/blob/535e08aebddc0f8adab47e5db22369be34479d70/app/controllers/api/v1/submission_similarities_controller.rb#L62C19-L62C19

In this line we should use rescue block for casework with a single render instead of calling multiple renders https://github.com/WING-NUS/SSID/blob/535e08aebddc0f8adab47e5db22369be34479d70/app/controllers/api/v1/submission_similarities_controller.rb#L23

Environment

Screenshots

Thanks!