Switched the ThangNamesCollection to use GET instead of POST.

This commit is contained in:
Scott Erickson 2014-11-25 15:36:24 -08:00
parent 0b4bc61b01
commit b018746565

View file

@ -6,10 +6,13 @@ module.exports = class ThangNamesCollection extends CocoCollection
model: ThangType
isCachable: false
constructor: (@ids) -> super()
constructor: (@ids) ->
super()
@ids.sort()
if @ids.length > 55
console.error 'Too many ids, we\'ll likely go over the GET url kind-of-limit of 2000 characters.'
fetch: (options) ->
options ?= {}
method = if application.isIPadApp then 'GET' else 'POST' # Not sure why this was required that one time.
_.extend options, {type: method, data: {ids: @ids}}
_.extend options, {data: {ids: @ids}}
super(options)