diff --git a/client/js/tickets/wizard.js b/client/js/tickets/wizard.js index acab630f74..ba70ec08dc 100644 --- a/client/js/tickets/wizard.js +++ b/client/js/tickets/wizard.js @@ -3,7 +3,8 @@ require('../cards/create') const request = require('../common/super-agent-promise') const create_card = require('../cards/create') const format_err = require('../common/format_response_error') -var path = '/nonprofits/' + app.nonprofit_id + '/events/' + appl.event_id + '/tickets' +const {nonprofitEventTicketsPath} = require('../../../app/javascript/routes') +const path = nonprofitEventTicketsPath(app.nonprofit_id, appl.event_id) const autocomplete = require('../components/address-autocomplete-viewscript'); diff --git a/package.json b/package.json index 95ae127618..56026828be 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "test": "rake -v spec && yarn build && yarn jest", "export-button-config": "bundle exec rake settings:generate_json", "export-i18n": "bundle exec rake settings:combine_translations", + "export-routes": "bundle exec rails js:routes:typescript", "tsc": "tsc" }, "devDependencies": { diff --git a/script/build.sh b/script/build.sh index 655b747e13..11a308ea2b 100755 --- a/script/build.sh +++ b/script/build.sh @@ -7,7 +7,7 @@ set -e set -o pipefail export DATABASE_URL=${BUILD_DATABASE_URL:-postgres://admin:password@localhost/commitchange_development_legacy} echo $DATABASE_URL -yarn export-button-config && yarn export-i18n +yarn export-button-config && yarn export-i18n && yarn export-routes if [ -n "$HOUDINI_WATCH" ]; then