Module: Parse::API::Aggregate::ClassMethods
- Defined in:
- lib/parse/api/aggregate.rb
Overview
Class methods to be applied to Client
Instance Method Summary collapse
-
#aggregate_uri_path(className) ⇒ String
Get the aggregate API path for this class.
Instance Method Details
#aggregate_uri_path(className) ⇒ String
Get the aggregate API path for this class.
className is validated to prevent path-smuggling — aggregate endpoints are master-key-only on Parse Server, so any traversal here pivots a master-key request to a different endpoint.
35 36 37 38 39 40 41 |
# File 'lib/parse/api/aggregate.rb', line 35 def aggregate_uri_path(className) if className.is_a?(Parse::Pointer) className = className.parse_class end className = Parse::API::PathSegment.identifier!(className, kind: "className") "#{PATH_PREFIX}#{className}" end |