mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-18 03:23:42 -05:00
18 lines
514 B
CoffeeScript
18 lines
514 B
CoffeeScript
ThangType = require 'models/ThangType'
|
|
CocoCollection = require 'collections/CocoCollection'
|
|
|
|
module.exports = class ThangNamesCollection extends CocoCollection
|
|
url: '/db/thang.type/names'
|
|
model: ThangType
|
|
isCachable: false
|
|
|
|
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 ?= {}
|
|
_.extend options, {data: {ids: @ids}}
|
|
super(options)
|