meteor-astronomy icon indicating copy to clipboard operation
meteor-astronomy copied to clipboard

Promise in resolve() mapped fields

Open yorrd opened this issue 6 years ago • 3 comments

It would be lovely to be able to use async functions in resolve() methods. That way, I could aggregate a database to a fields. Right now, I have to hack the publication because if I use async methods in resolve(), a promise is literally set as the value of the field (which makes sense but doesn't help me)

Thanks!

yorrd avatar Jan 06 '19 11:01 yorrd

Are you sure that you're talking about astronomy?

lukejagodzinski avatar Jan 06 '19 14:01 lukejagodzinski

Pretty sure. The resolve() method from here: https://jagi.github.io/meteor-astronomy/#mapping-fields :)

yorrd avatar Jan 06 '19 22:01 yorrd

Oh I see, you have to be more precise the next time :-). I like promises and everything related so I'm happy to introduce such a feature. I will investigate if it's gonna be a problem to introduce it.

On Sun, Jan 6, 2019, 11:32 PM Yorrd <[email protected] wrote:

Pretty sure. The resolve() method from here: https://jagi.github.io/meteor-astronomy/#mapping-fields :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jagi/meteor-astronomy/issues/701#issuecomment-451781318, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAKXUL3-f4UHHLy3BzC3GBMF82GnwG8ks5vAnl0gaJpZM4ZyYo9 .

lukejagodzinski avatar Jan 07 '19 09:01 lukejagodzinski