nyc-boundaries icon indicating copy to clipboard operation
nyc-boundaries copied to clipboard

Fixes SentateURL by creating a redirect page and function

Open zhik opened this issue 2 years ago • 3 comments

Fixes #89 by creating an extra property redirectUrl for layers that does a lookup for the NYSenate url via the https://pubgeo.nysenate.gov/api/v2/map/senate endpoint.

See docs for the endpoint here

The redirectUrl is activated when /?redirect query parameter exist in the url.

A screenshot of the redirect page. First line reads "You are being redirected..." Second line is an error message "If you are stuck, try the following: url to webpage"

zhik avatar Nov 08 '23 04:11 zhik

@zhik Do we need to redirect users? The original district URLs should be restored soon: https://github.com/nysenate/NYSenate.gov-Website-D9/issues/41

evadecker avatar Nov 08 '23 18:11 evadecker

The district URLs are working correctly now, without redirects:

https://boundaries.beta.nyc/?map=ss https://www.nysenate.gov/district/20

https://github.com/BetaNYC/nyc-boundaries/assets/4117920/5cc57f74-eb21-4547-97a1-002cf802cfeb

evadecker avatar Nov 14 '23 00:11 evadecker

Great. I will undo the changes but keep the function to redirect for other district types.

zhik avatar Nov 17 '23 04:11 zhik