Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

WIP: Add /tournaments/:id/stages endpoint #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Thor77
Copy link
Member

@Thor77 Thor77 commented Oct 10, 2019

@@ -35,6 +36,29 @@ def update
end
end

def index

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/CyclomaticComplexity: Cyclomatic complexity for index is too high. [7/6]
Metrics/PerceivedComplexity: Perceived complexity for index is too high. [10/7]

@Thor77 Thor77 changed the title Add /tournaments/:id/stages endpoint WIP: Add /tournaments/:id/stages endpoint Oct 10, 2019
else
render json: { error: 'There\'s no group stage for this tournament' }, status: :not_found
end
elsif level_param.to_i.to_s == level_param
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about .is_a? Integer

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Rails doesn't do any auto-conversion magic, level_param is always a String... but maybe it does, will try

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants