denoland / saaskit

A modern SaaS template built on Fresh.
https://deno.com/saaskit
MIT License
1.17k stars 142 forks source link

todo: remove `getManyValues()` and `getDatesSince()` #464

Closed iuioiua closed 1 year ago

iuioiua commented 1 year ago

getManyValues() is used in getManyMetrics(). It's slightly hacky in that it defines the exact dates to get values. It should instead use kv.list() with the selector parameter being set to have a start property of x time ago, using formatDate().

This also means aiming to remove getDatesSince().

mbhrznr commented 1 year ago

quick heads-up: we've chosen to use exact dates to fix #276. by using kv.list we would potentially re-introduce unwanted side-effects, wouldn't we?

however we might want to add some further documentation on that topic.

iuioiua commented 1 year ago

Yeah... I played with this today, only to quickly remind myself why we did this in the first place. I'll close this for now and re-open it if I come up with a decent solution. If you do first, please let me know 🙂