changed syntax again due to shell replacing $variables

This commit is contained in:
Ulf Gebhardt 2022-01-14 18:49:35 +01:00
parent 543c741cd1
commit 90effb41b5
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
11 changed files with 18 additions and 18 deletions

View File

@ -1,4 +1,4 @@
GRAPHQL_URI=http://localhost:4000/graphql GRAPHQL_URI=http://localhost:4000/graphql
WALLET_AUTH_URL=http://localhost/authenticate?token=$token WALLET_AUTH_URL=http://localhost/authenticate?token={token}
WALLET_URL=http://localhost/login WALLET_URL=http://localhost/login
DEBUG_DISABLE_AUTH=false DEBUG_DISABLE_AUTH=false

View File

@ -38,7 +38,7 @@ export default {
this.$store.dispatch('logout') this.$store.dispatch('logout')
}, },
wallet() { wallet() {
window.location = CONFIG.WALLET_AUTH_URL.replace('$token', this.$store.state.token) window.location = CONFIG.WALLET_AUTH_URL.replace('{token}', this.$store.state.token)
this.$store.dispatch('logout') // logout without redirect this.$store.dispatch('logout') // logout without redirect
}, },
}, },

View File

@ -19,7 +19,7 @@ const environment = {
const endpoints = { const endpoints = {
GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost:4000/graphql', GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost:4000/graphql',
WALLET_AUTH_URL: process.env.WALLET_AUTH_URL || 'http://localhost/authenticate?token=$token', WALLET_AUTH_URL: process.env.WALLET_AUTH_URL || 'http://localhost/authenticate?token={token}',
WALLET_URL: process.env.WALLET_URL || 'http://localhost/login', WALLET_URL: process.env.WALLET_URL || 'http://localhost/login',
} }

View File

@ -19,8 +19,8 @@ DB_DATABASE=gradido_community
#RESEND_TIME= #RESEND_TIME=
RESEND_TIME=10 RESEND_TIME=10
#EMAIL_LINK_VERIFICATION=http://localhost/checkEmail/$code #EMAIL_LINK_VERIFICATION=http://localhost/checkEmail/{code}
#EMAIL_LINK_SETPASSWORD=http://localhost/reset/$code #EMAIL_LINK_SETPASSWORD=http://localhost/reset/{code}
#KLICKTIPP_USER= #KLICKTIPP_USER=
#KLICKTIPP_PASSWORD= #KLICKTIPP_PASSWORD=

View File

@ -51,8 +51,8 @@ const email = {
EMAIL_SMTP_URL: process.env.EMAIL_SMTP_URL || 'gmail.com', EMAIL_SMTP_URL: process.env.EMAIL_SMTP_URL || 'gmail.com',
EMAIL_SMTP_PORT: process.env.EMAIL_SMTP_PORT || '587', EMAIL_SMTP_PORT: process.env.EMAIL_SMTP_PORT || '587',
EMAIL_LINK_VERIFICATION: EMAIL_LINK_VERIFICATION:
process.env.EMAIL_LINK_VERIFICATION || 'http://localhost/checkEmail/$code', process.env.EMAIL_LINK_VERIFICATION || 'http://localhost/checkEmail/{code}',
EMAIL_LINK_SETPASSWORD: process.env.EMAIL_LINK_SETPASSWORD || 'http://localhost/reset/$code', EMAIL_LINK_SETPASSWORD: process.env.EMAIL_LINK_SETPASSWORD || 'http://localhost/reset/{code}',
RESEND_TIME: isNaN(resendTime) ? 10 : resendTime, RESEND_TIME: isNaN(resendTime) ? 10 : resendTime,
} }

View File

@ -162,7 +162,7 @@ describe('UserResolver', () => {
describe('account activation email', () => { describe('account activation email', () => {
it('sends an account activation email', () => { it('sends an account activation email', () => {
const activationLink = CONFIG.EMAIL_LINK_VERIFICATION.replace(/\$code/g, emailOptIn) const activationLink = CONFIG.EMAIL_LINK_VERIFICATION.replace(/{code}/g, emailOptIn)
expect(sendAccountActivationEmail).toBeCalledWith({ expect(sendAccountActivationEmail).toBeCalledWith({
link: activationLink, link: activationLink,
firstName: 'Peter', firstName: 'Peter',

View File

@ -448,7 +448,7 @@ export class UserResolver {
const emailOptIn = await createEmailOptIn(loginUserId, queryRunner) const emailOptIn = await createEmailOptIn(loginUserId, queryRunner)
const activationLink = CONFIG.EMAIL_LINK_VERIFICATION.replace( const activationLink = CONFIG.EMAIL_LINK_VERIFICATION.replace(
/\$code/g, /{code}/g,
emailOptIn.verificationCode.toString(), emailOptIn.verificationCode.toString(),
) )
const emailSent = await sendAccountActivationEmail({ const emailSent = await sendAccountActivationEmail({
@ -486,7 +486,7 @@ export class UserResolver {
const emailOptIn = await createEmailOptIn(loginUser.id, queryRunner) const emailOptIn = await createEmailOptIn(loginUser.id, queryRunner)
const activationLink = CONFIG.EMAIL_LINK_VERIFICATION.replace( const activationLink = CONFIG.EMAIL_LINK_VERIFICATION.replace(
/\$code/g, /{code}/g,
emailOptIn.verificationCode.toString(), emailOptIn.verificationCode.toString(),
) )
@ -523,7 +523,7 @@ export class UserResolver {
const optInCode = await getOptInCode(loginUser) const optInCode = await getOptInCode(loginUser)
const link = CONFIG.EMAIL_LINK_SETPASSWORD.replace( const link = CONFIG.EMAIL_LINK_SETPASSWORD.replace(
/\$code/g, /{code}/g,
optInCode.verificationCode.toString(), optInCode.verificationCode.toString(),
) )

View File

@ -21,15 +21,15 @@ EMAIL_USERNAME=peter@lustig.de
EMAIL_SENDER=peter@lustig.de EMAIL_SENDER=peter@lustig.de
EMAIL_PASSWORD=1234 EMAIL_PASSWORD=1234
EMAIL_SMTP_URL=smtp.lustig.de EMAIL_SMTP_URL=smtp.lustig.de
EMAIL_LINK_VERIFICATION=https://stage1.gradido.net/checkEmail/$code EMAIL_LINK_VERIFICATION=https://stage1.gradido.net/checkEmail/{code}
EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset/$code EMAIL_LINK_SETPASSWORD=https://stage1.gradido.net/reset/{code}
WEBHOOK_ELOPAGE_SECRET=secret WEBHOOK_ELOPAGE_SECRET=secret
# frontend # frontend
GRAPHQL_URI=https://stage1.gradido.net/graphql GRAPHQL_URI=https://stage1.gradido.net/graphql
ADMIN_AUTH_URL=https://stage1.gradido.net/admin/authenticate?token=$token ADMIN_AUTH_URL=https://stage1.gradido.net/admin/authenticate?token={token}
# admin # admin
WALLET_AUTH_URL=https://stage1.gradido.net/authenticate?token=$token WALLET_AUTH_URL=https://stage1.gradido.net/authenticate?token={token}
WALLET_URL=https://stage1.gradido.net/login WALLET_URL=https://stage1.gradido.net/login

View File

@ -1,3 +1,3 @@
GRAPHQL_URI=http://localhost/graphql GRAPHQL_URI=http://localhost/graphql
DEFAULT_PUBLISHER_ID=2896 DEFAULT_PUBLISHER_ID=2896
ADMIN_AUTH_URL=http://localhost/admin/authenticate?token=$token ADMIN_AUTH_URL=http://localhost/admin/authenticate?token={token}

View File

@ -20,7 +20,7 @@ const environment = {
const endpoints = { const endpoints = {
GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost/graphql', GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost/graphql',
ADMIN_AUTH_URL: process.env.ADMIN_AUTH_URL || 'http://localhost/admin/authenticate?token=$token', ADMIN_AUTH_URL: process.env.ADMIN_AUTH_URL || 'http://localhost/admin/authenticate?token={token}',
} }
const options = {} const options = {}

View File

@ -108,7 +108,7 @@ export default {
this.balance -= ammount this.balance -= ammount
}, },
admin() { admin() {
window.location.assign(CONFIG.ADMIN_AUTH_URL.replace('$token', this.$store.state.token)) window.location.assign(CONFIG.ADMIN_AUTH_URL.replace('{token}', this.$store.state.token))
this.$store.dispatch('logout') // logout without redirect this.$store.dispatch('logout') // logout without redirect
}, },
setVisible(bool) { setVisible(bool) {