Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urlForCustomAction not working. #45

Closed
omairrazam opened this issue May 30, 2018 · 4 comments
Closed

urlForCustomAction not working. #45

omairrazam opened this issue May 30, 2018 · 4 comments

Comments

@omairrazam
Copy link

omairrazam commented May 30, 2018

Hi. your addon is really cool.

I configured it as you explain in your docs. I am using version 2.1.0.

In my adapter, I am using some customised url but it is not taking affect. I am not sure why.
This is the url that its make api/v1/users/resetPassword, when I just want api/v1/resetPassword

This is my adapter code. It is already inheriting RESTAdapter.

import ApplicationAdapter from './application'; 

import { AdapterMixin } from 'ember-custom-actions';

export default ApplicationAdapter.extend(AdapterMixin,{

urlForCustomAction(modelName, id, snapshot, actionId, queryParams) {

return 'https://domain.com/resetPassword';

}

});

Any help will be really appreciated.

Thanks in advance.

@Exelord
Copy link
Member

Exelord commented May 30, 2018

What is your action definition? Adapter integration works only with customAction not modelAction and resourceAction

@omairrazam
Copy link
Author

Hi, thanks for looking into the issue.
I am using resourceAction. In the docs there is no mention of customAction. Secondly I tried customAction and it threw unknown error etc.

@Exelord
Copy link
Member

Exelord commented May 30, 2018

There is. Take a look at customAction section. First paragraph. All the integrations are subheaders of this section. I will improve the docs.

customAction has a little different api, did you adjust it? If taht helps you can take a look at dummy app in the code it's using it.

@omairrazam
Copy link
Author

I tried that but it didn't work, may be I made some mistake. I will check again soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants