Closed ArturKami closed 7 years ago
ok i log ApiService.js the addResponseInterceptor part
.addResponseInterceptor(function (response, operation, what) {
if (operation === 'getList') {
var newResponse = response.data[what]
$log.log("new response : "+newResponse)
$log.log("response",response)
//newResponse.error = response.error
return newResponse
}
return response
})
and this is what i return in your user-list component using users laravel conttoller
and this is result from my component using the same users laravel controller but difrent route name
I got it ! this is my laravel controller returning
public function getIndex()
{
$users = User::all();
return response()->success(compact('users'));
}
i changed it to
public function getIndex()
{
$sprawdzaniepingsystemow = User::all();
return response()->success(compact('sprawdzaniepingsystemow'));
}
my route was
$api->controller('sprawdzaniepingsystemow', 'Monitoring\SprawdzaniePingSystemowController');
and my request was
let us = API.service('sprawdzaniepingsystemow')
us.getList()
.then((response) => {
let dataSet = response.plain()
$log.log(dataSet);
})
so even my routing was fine restangular expect "sprawdzaniepingsystemow" array not "users" to wrap objet around of it
Hi First of all great job with this project it's fantastic ! but i got litle problem, i hope u can help me out :)
im using
Please help me !