Skip to content

Commit

Permalink
cleaned up the files generic.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jaisejose1123 committed Apr 19, 2024
1 parent 4f96ba5 commit 30e6eca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/controllers/api/base_controller/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,10 @@ def model_ident(model, type = nil)
end

def validate_id(id, key_id, klass)

if id.nil? || (key_id == "id" && !id.integer?)
raise BadRequestError, "Invalid #{klass} #{key_id} #{id || "nil"} specified"
raise BadRequestError, "Invalid #{klass} #{key_id} #{id || "nil"} specified"
end

end
end
end
end
end

0 comments on commit 30e6eca

Please sign in to comment.