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

Allow custom parameters to be passed to a DELETE service #682

Merged
merged 2 commits into from
May 31, 2024

Conversation

geographika
Copy link
Collaborator

@geographika geographika commented May 31, 2024

A new placeholder function has been added that can be overridden in a subclass to allow parameters to be passed to a DELETE service via the querystring.

For example, in a controller that inherits from CpsiMapview.form.ControllerMixin getDeleteParameters can be added to return an object of key value pairs:

    getDeleteParameters: function () {
        var me = this;
        var myCustomParam= me.getViewModel().get('myCustomParam');
        return {
            myCustomParam: myCustomParam
        };
    }

The DELETE calls with then include a querystring e.g. /object/12432?myCustomParam=abc

This should have no effect on any existing code or classes.

@geographika geographika merged commit 04ff75b into compassinformatics:master May 31, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants