# |
Dec 29th 2018, 16:48 |
itmpls |
even though those records aren't really "new", the *selection* of them is "dirty" |
# |
Dec 29th 2018, 16:48 |
itmpls |
would a belongsToMany be marked dirty if different ones are marked via $this->Form->control('categories._ids', ['multiple' => 'checkbox']); ? |
# |
Dec 29th 2018, 16:48 |
k4t |
without setting "accept" header |
# |
Dec 29th 2018, 16:48 |
admad |
Set "Accept" header |
# |
Dec 29th 2018, 16:48 |
k4t |
instead I would like to see the same bahavior as it was .json URL or just throw 404 error |
# |
Dec 29th 2018, 16:48 |
k4t |
now when I will use url witohut .json ext I will got error 500 and Missing template |
# |
Dec 29th 2018, 16:47 |
k4t |
could you please also give me some hints how I can disable urls without .json / .xml extension when I am building REST API? |
# |
Dec 29th 2018, 16:47 |
k4t |
thanks |
# |
Dec 29th 2018, 16:46 |
admad |
Fix will be available in next 3.7 release |
# |
Dec 29th 2018, 16:45 |
k4t |
oh no! |
# |
Dec 29th 2018, 16:45 |
admad |
It's a bug |
# |
Dec 29th 2018, 16:45 |
k4t |
if I do not throw any errors/exception from that action I will get normal JSON response |
# |
Dec 29th 2018, 16:44 |
k4t |
@admad any ideas (latest Cake and CRUD plugin version) why when I throw exception from e.g. url like: "/api/v1/users.json" I am not getting response in JSON format but normal HTML? |
# |
Dec 29th 2018, 16:42 |
NickBusey |
Hmm, looks interesting but also not unfinished |
# |
Dec 29th 2018, 16:40 |
challgren |
https://github.com/FriendsOfCake/crud-users |
# |
Dec 29th 2018, 16:40 |
NickBusey |
Hmm, don't see that on awesome-cake, this one? burzum/cakephp-user-tools |
# |
Dec 29th 2018, 16:40 |
challgren |
And that is why @admad is the man! |
# |
Dec 29th 2018, 16:39 |
admad |
There's crud-users plugin too :) |
# |
Dec 29th 2018, 16:36 |
NickBusey |
I have a CRUD API fully working, just not login/register |
# |
Dec 29th 2018, 16:36 |
NickBusey |
I am using both :) |
# |
Dec 29th 2018, 16:36 |
admad |
NickBusey: I suggest checking out Crud plugin and it's ApiListener. I makes developing APIs quite easier |
# |
Dec 29th 2018, 16:23 |
NickBusey |
Yea guess I'll just rip out CakeDC/users, it's nice to get up and running quick, but I've already had a ton of redirect loop problems as well as now this API incompatibility |
# |
Dec 29th 2018, 16:08 |
challgren |
Just dont forget to update your routes |
# |
Dec 29th 2018, 16:08 |
NickBusey |
Cool I may try that.. thanks |
# |
Dec 29th 2018, 16:05 |
challgren |
And I didnt want logout to completely logout the user |
# |
Dec 29th 2018, 16:04 |
challgren |
@nickbusey I had to do it with my logout function because I do impersonate users https://audit-app.gitlab.io/website/src/Controller/PagesController.php.html#108 |
# |
Dec 29th 2018, 16:04 |
itmpls |
way more control over everything |
# |
Dec 29th 2018, 16:04 |
itmpls |
that's what I do |
# |
Dec 29th 2018, 16:02 |
challgren |
https://github.com/CakeDC/users/blob/master/src/Controller/Traits/LoginTrait.php |
# |
Dec 29th 2018, 16:01 |
challgren |
Or just use your own custom controllers and the traits provided |
# |
Dec 29th 2018, 16:01 |
NickBusey |
Alright, well I'll submit a pull request to CakeDC/users to remove the part where they say they support APIs |
# |
Dec 29th 2018, 16:00 |
challgren |
Yeah maybe not relying on CaekDC/users controllers might be a solution for @nickbusey |
# |
Dec 29th 2018, 16:00 |
admad |
@challgren then might be good idea to not use it if can't be disabled :) |
# |
Dec 29th 2018, 15:59 |
NickBusey |
Yea, I've been going through that. I have JWT working with the other resources |
# |
Dec 29th 2018, 15:59 |
admad |
NickBusey: http://www.bravo-kernel.com/2015/04/how-to-add-jwt-authentication-to-a-cakephp-3-rest-api/ |
# |
Dec 29th 2018, 15:59 |
NickBusey |
Martin`: Yup! |
# |
Dec 29th 2018, 15:58 |
challgren |
@admad CakeDC/users enables its https://github.com/CakeDC/users/blob/master/src/Controller/AppController.php#L32 |
# |
Dec 29th 2018, 15:58 |
Martin` |
NickBusey: ok, so nicest is to build something like remember but with fallback to cache when callable returns false :P |
# |
Dec 29th 2018, 15:57 |
admad |
The fact that it is looking for _Token means you do have it enabled |
# |
Dec 29th 2018, 15:57 |
NickBusey |
All the rest of my API works, user api fails |
# |
Dec 29th 2018, 15:57 |
NickBusey |
I'm not? I have disabled them both |