code4sac / sacramento-campaign-finance

Dataset and dashboard of money in local politics
https://sacramento-campaign-cash.netlify.app/
2 stars 5 forks source link

Fix download CSV server code #7

Closed natebass closed 1 year ago

natebass commented 1 year ago

Add a filter to download CSV data based on the bodyID (i.e. city or county). This allows the download button to work on the city and county page.

MonstersInc-sudo commented 1 year ago

@natebass do you think it would be better to use an absolute path instead of relative for your config import? Mostly considering from a maintenance perspective.

natebass commented 1 year ago

I changed the import of the config file to use an absolute path.

@jeremiak Do you have a preference using import config from '$lib/../../config.js' vs import config from '/config.js'? There is the same kind of code in this file https://github.com/code4sac/sacramento-campaign-finance/blob/main/src/routes/%2Bpage.server.js#L3.

jeremiak commented 1 year ago

@natebass Nope, not a strongly held preference at least. Down to go with this / - I think it's pretty clear.