       get:
         action: ->
           entities = collection.find().fetch()
-          if not entities
+          if entities
             {status: "success", data: entities}
           else
             statusCode: 404

          else
            statusCode: 404
            body: {status: "fail", message: "No items found"}


  ###

              .value()
          # Partition the endpoints into their respective routes
          if method in methodsOnCollection
            _.extend collectionRouteEndpoints, configuredEndpoint
          else _.extend entityRouteEndpoints, configuredEndpoint
          return
      , this

    # Add the routes to the API
    @add path, defaultOptions, collectionRouteEndpoints
    @add "#{path}/:id", defaultOptions, entityRouteEndpoints

    return

