   @param platform is the source of the request to upsert the resource
 
 ###
-upsertResource = (data, handlerFunc, platform) ->
+_upsertResource = (data, handlerFunc, platform) ->
 
   @.setContentType _jsonContentType
   resource = parseRequestData data, @.requestHeaders["content-type"]


###

  upsertResource

  @example authenticates and then calls the upsert handler

    return upsertResource.call @, data, Apollos.person.update, platform

  @param context should be the HTTP.methods handler function
  @param data is the javascript object with the request data

    delete: (data) ->
      try
        Apollos.debug "Got DELETE for #{url} id=#{@.params.id}"
        platform = _authenticatePlatform.call @, collection

        if not platform
          Apollos.debug "Dropping request because of unknown platform"
          return

        if options.subDocName
          handler = Apollos[singular][options.subDocName].delete
        else
          handler = Apollos[singular].delete

        return _deleteResource.call @, handler, platform.name

      catch error
        @.setStatusCode _unexpectedError
