diff --git a/app/src/frontend/building/data-containers/planning.tsx b/app/src/frontend/building/data-containers/planning.tsx index d4991523..7be94547 100644 --- a/app/src/frontend/building/data-containers/planning.tsx +++ b/app/src/frontend/building/data-containers/planning.tsx @@ -95,7 +95,7 @@ const PlanningView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} onChange={props.onChange} - placeholder="If yes, add ID" + placeholder="If yes, add ID here" linkTargetFunction={(id: String) => { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } } linkDescriptionFunction={(id: String) => { return "ID Link" } } /> @@ -155,7 +155,7 @@ const PlanningView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} onChange={props.onChange} - placeholder="If yes, add ID" + placeholder="If yes, add ID here" linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } } linkDescriptionFunction={(id: String) => { return "ID Link" } } /> diff --git a/app/src/tiles/tileserver.ts b/app/src/tiles/tileserver.ts index 07c99a58..38a9c511 100644 --- a/app/src/tiles/tileserver.ts +++ b/app/src/tiles/tileserver.ts @@ -38,16 +38,16 @@ router.get('/:tileset/:z/:x/:y(\\d+):scale(@\\dx)?.png', handleTileRequest); function parseTileParams(params: any): TileParams { const { tileset, z, x, y, scale } = params; - if (!allTilesets.includes(tileset)) throw new Error('Invalid value for tileset'); + if (!allTilesets.includes(tileset)) throw new Error('Invalid value for tileset: ' + tileset); const intZ = strictParseInt(z); - if (isNaN(intZ)) throw new Error('Invalid value for z'); + if (isNaN(intZ)) throw new Error('Invalid value for z: ' + intZ); const intX = strictParseInt(x); - if (isNaN(intX)) throw new Error('Invalid value for x'); + if (isNaN(intX)) throw new Error('Invalid value for x: ' + intX); const intY = strictParseInt(y); - if (isNaN(intY)) throw new Error('Invalid value for y'); + if (isNaN(intY)) throw new Error('Invalid value for y: ' + intY); let intScale: number; if (scale === '@2x') { diff --git a/docs/setup-dev-environment.md b/docs/setup-dev-environment.md index 8d88dd57..0838e520 100644 --- a/docs/setup-dev-environment.md +++ b/docs/setup-dev-environment.md @@ -265,6 +265,11 @@ In your Ubuntu installation where you have been running these setup steps (e.g. ```bash psql < +``` + +Alternatively, if you get errors using the above command, use pg_restore: + ```bash +pg_restore -d ``` #### Run migrations @@ -275,7 +280,12 @@ do this are located in the `migrations` folder of your local repository. ```bash ls ~/colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql < $migration; done; ``` - + +Again, if you get errors, you may need to manually specify the database name + +```bash +ls ~/colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d < $migration; done; +```