Skip to content

Commit

Permalink
RTO-35842 Code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnaeverestengineering committed Nov 14, 2024
1 parent 729eef0 commit aa74755
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/moodle_rb/courses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ def show(*id)
}.merge(query_options)
)
check_for_errors(response)

return response.parsed_response if id.count > 1

response.parsed_response.first
id.count > 1 ? response.parsed_response : response.parsed_response.first
end

def destroy(id)
Expand Down

0 comments on commit aa74755

Please sign in to comment.