Skip to content

Transform Closures (Or something like that) #11

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

Closed
gperdomor opened this issue Jul 25, 2018 · 2 comments
Closed

Transform Closures (Or something like that) #11

gperdomor opened this issue Jul 25, 2018 · 2 comments
Milestone

Comments

@gperdomor
Copy link
Member

Motivation Behind Feature

Now, convert the results to other structs/public responses is not posible, for example, a common case is the User model which have sensitive data like password, confirmation token, even more, but that fields can't be returned in the response, so we need to create a PublicUser struct to exclude that fields

Feature Description
Maybe a solution is to pass some kind of transform closure which can be used in the pagination process

@anthonycastelli
Copy link
Member

I've been out of town for a while and haven't had much time to work on doing something like that. Originally I wanted to do something that conformed to a protocol and would allow easy transformation. My goal is still that, however, I haven't given it much thought to work on it since I've just been swamped. I'll be home in a couple of weeks and will be able to start thinking about some ideas again.

@LinusGeffarth
Copy link

@anthonycastelli so is this possible rn? From #12, I can't really tell how to do it...

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

No branches or pull requests

3 participants