+Q = require 'q'
 {models, Resource, filters} = require '../resource_helper'
 
 class CompetitionResource extends Resource

  getEndpoints: -> [
    getByOwner
    index
    'show'
    'update'
    'destroy'

  route: '/by-owner/:ownerId'
  method: 'GET'
  filters: [filters.FromUrlParams, filters.FromQueryParams]
  handler: ->
    ownerId = @params.ownerId
    showClosed = @params.showClosed
