Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

allow passing response-predicate to wrap-restful-format#60

Open
ninjudd wants to merge 1 commit into
ngrunwald:masterfrom
ninjudd:master
Open

allow passing response-predicate to wrap-restful-format#60
ninjudd wants to merge 1 commit into
ngrunwald:masterfrom
ninjudd:master

Conversation

@ninjudd

@ninjudd ninjudd commented Aug 6, 2016

Copy link
Copy Markdown
Contributor

I'm not sure if this is the best fix for it, but right now, there is no way to pass :predicate to wrap-restful-format, because it ends up getting passed to both wrap-restful-params and wrap-restful-response, which doesn't work.

In my case, I only need to pass a predicate to wrap-restful-response, so I made that wrap-format-response accept :response-predicate and prefer that over :predicate.

There's probably a better way to solve this issue. I'm open to suggestions.

@CmdrDats

Copy link
Copy Markdown

Just got bitten hard by this issue - LGTM please?

@CmdrDats

CmdrDats commented Jan 17, 2018

Copy link
Copy Markdown

The alternative is in format_params.clj:273, the dissoc should also get rid of :predicate because it's entirely not composable. The predicates would need to be per format since it uses them to determine if it should handle the request.

@Deraen

Deraen commented Jan 17, 2018

Copy link
Copy Markdown
Collaborator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants