Here is my resource
var gamesRes = $resource('/collections/test13/:id',
{gameID: '@id'}
);
and what i'm trying to do
$scope.res = gamesRes.save({}, $scope.newGame);
If i'm setting isArray: true to save method it works fine. Strange thing is that i don't see, that $scope.res is really an array, in debugger it looks like an object
res: {
player1: sdf
player2: sdf
}
And I need to look like an object, not an array.
Also here is post method in server
app.post('/collections/:collectionName', function(req, res, next) {
req.collection.insert(req.body, {}, function(e, results){
if (e) return next(e)
res.send(results)
})
})
What i'm missing here?