Backend-Adresse aus .env file beziehen

This commit is contained in:
Torsten Schulz
2024-06-15 23:29:41 +02:00
parent 61653ff407
commit 4e371f88b1
23 changed files with 568 additions and 83 deletions

1
.env Normal file
View File

@@ -0,0 +1 @@
VUE_APP_BACKEND_URL=

View File

@@ -49,7 +49,6 @@ exports.login = async (req, res) => {
res.status(200).json({ message: 'Login erfolgreich', token, 'user': user }); res.status(200).json({ message: 'Login erfolgreich', token, 'user': user });
} catch (error) { } catch (error) {
console.log(error);
res.status(500).json({ message: 'Ein Fehler ist aufgetreten' }); res.status(500).json({ message: 'Ein Fehler ist aufgetreten' });
} }
}; };

View File

@@ -15,8 +15,6 @@ const createEventPlace = async (req, res) => {
res.status(201).json(eventPlace); res.status(201).json(eventPlace);
} catch (error) { } catch (error) {
res.status(500).json({ error: 'Failed to create event place' }); res.status(500).json({ error: 'Failed to create event place' });
console.log(req.body);
console.log(error);
} }
}; };

492
package-lock.json generated
View File

@@ -27,12 +27,15 @@
"body-parser": "^1.20.2", "body-parser": "^1.20.2",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"cors": "^2.8.5", "cors": "^2.8.5",
"crypto": "^1.0.1",
"dotenv": "^16.4.5",
"express": "^4.19.2", "express": "^4.19.2",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"mysql2": "^3.10.1", "mysql2": "^3.10.1",
"nodemon": "^3.1.3", "nodemon": "^3.1.3",
"sequelize": "^6.37.3", "sequelize": "^6.37.3",
"sequelize-cli": "^6.6.2", "sequelize-cli": "^6.6.2",
"vm-browserify": "^1.1.2",
"vue": "^3.2.13", "vue": "^3.2.13",
"vue-multiselect": "^3.0.0", "vue-multiselect": "^3.0.0",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
@@ -45,8 +48,13 @@
"@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0", "@vue/cli-service": "~5.0.0",
"crypto-browserify": "^3.12.0",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3" "eslint-plugin-vue": "^8.0.3",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"stream-browserify": "^3.0.0",
"webpack": "^5.92.0"
} }
}, },
"node_modules/@achrinza/node-ipc": { "node_modules/@achrinza/node-ipc": {
@@ -3402,6 +3410,15 @@
} }
} }
}, },
"node_modules/@vue/cli-service/node_modules/dotenv": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
"dev": true,
"engines": {
"node": ">=10"
}
},
"node_modules/@vue/cli-shared-utils": { "node_modules/@vue/cli-shared-utils": {
"version": "5.0.8", "version": "5.0.8",
"resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-5.0.8.tgz", "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-5.0.8.tgz",
@@ -4139,6 +4156,23 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/asn1.js": {
"version": "4.10.1",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
"integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
"dev": true,
"dependencies": {
"bn.js": "^4.0.0",
"inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0"
}
},
"node_modules/asn1.js/node_modules/bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
},
"node_modules/astral-regex": { "node_modules/astral-regex": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
@@ -4370,6 +4404,12 @@
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
}, },
"node_modules/bn.js": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
"integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==",
"dev": true
},
"node_modules/body-parser": { "node_modules/body-parser": {
"version": "1.20.2", "version": "1.20.2",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
@@ -4442,6 +4482,116 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/brorand": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
"integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==",
"dev": true
},
"node_modules/browserify-aes": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
"dev": true,
"dependencies": {
"buffer-xor": "^1.0.3",
"cipher-base": "^1.0.0",
"create-hash": "^1.1.0",
"evp_bytestokey": "^1.0.3",
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
}
},
"node_modules/browserify-cipher": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
"integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
"dev": true,
"dependencies": {
"browserify-aes": "^1.0.4",
"browserify-des": "^1.0.0",
"evp_bytestokey": "^1.0.0"
}
},
"node_modules/browserify-des": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
"integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
"dev": true,
"dependencies": {
"cipher-base": "^1.0.1",
"des.js": "^1.0.0",
"inherits": "^2.0.1",
"safe-buffer": "^5.1.2"
}
},
"node_modules/browserify-rsa": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz",
"integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==",
"dev": true,
"dependencies": {
"bn.js": "^5.0.0",
"randombytes": "^2.0.1"
}
},
"node_modules/browserify-sign": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz",
"integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==",
"dev": true,
"dependencies": {
"bn.js": "^5.2.1",
"browserify-rsa": "^4.1.0",
"create-hash": "^1.2.0",
"create-hmac": "^1.1.7",
"elliptic": "^6.5.5",
"hash-base": "~3.0",
"inherits": "^2.0.4",
"parse-asn1": "^5.1.7",
"readable-stream": "^2.3.8",
"safe-buffer": "^5.2.1"
},
"engines": {
"node": ">= 0.12"
}
},
"node_modules/browserify-sign/node_modules/readable-stream": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
"dev": true,
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"node_modules/browserify-sign/node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.23.1", "version": "4.23.1",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz",
@@ -4509,6 +4659,12 @@
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true "dev": true
}, },
"node_modules/buffer-xor": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
"integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==",
"dev": true
},
"node_modules/bytes": { "node_modules/bytes": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -4670,6 +4826,16 @@
"integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
"dev": true "dev": true
}, },
"node_modules/cipher-base": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
"integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
"dev": true,
"dependencies": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
}
},
"node_modules/clean-css": { "node_modules/clean-css": {
"version": "5.3.3", "version": "5.3.3",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz",
@@ -5144,6 +5310,49 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/create-ecdh": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
"integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==",
"dev": true,
"dependencies": {
"bn.js": "^4.1.0",
"elliptic": "^6.5.3"
}
},
"node_modules/create-ecdh/node_modules/bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
},
"node_modules/create-hash": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
"dev": true,
"dependencies": {
"cipher-base": "^1.0.1",
"inherits": "^2.0.1",
"md5.js": "^1.3.4",
"ripemd160": "^2.0.1",
"sha.js": "^2.4.0"
}
},
"node_modules/create-hmac": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
"dev": true,
"dependencies": {
"cipher-base": "^1.0.3",
"create-hash": "^1.1.0",
"inherits": "^2.0.1",
"ripemd160": "^2.0.0",
"safe-buffer": "^5.0.1",
"sha.js": "^2.4.8"
}
},
"node_modules/crelt": { "node_modules/crelt": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz",
@@ -5163,6 +5372,34 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/crypto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==",
"deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in."
},
"node_modules/crypto-browserify": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
"integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
"dev": true,
"dependencies": {
"browserify-cipher": "^1.0.0",
"browserify-sign": "^4.0.0",
"create-ecdh": "^4.0.0",
"create-hash": "^1.1.0",
"create-hmac": "^1.1.0",
"diffie-hellman": "^5.0.0",
"inherits": "^2.0.1",
"pbkdf2": "^3.0.3",
"public-encrypt": "^4.0.0",
"randombytes": "^2.0.0",
"randomfill": "^1.0.3"
},
"engines": {
"node": "*"
}
},
"node_modules/css-declaration-sorter": { "node_modules/css-declaration-sorter": {
"version": "6.4.1", "version": "6.4.1",
"resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz",
@@ -5684,6 +5921,16 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/des.js": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz",
"integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==",
"dev": true,
"dependencies": {
"inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0"
}
},
"node_modules/destroy": { "node_modules/destroy": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
@@ -5699,6 +5946,23 @@
"integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
"dev": true "dev": true
}, },
"node_modules/diffie-hellman": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
"integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
"dev": true,
"dependencies": {
"bn.js": "^4.1.0",
"miller-rabin": "^4.0.0",
"randombytes": "^2.0.0"
}
},
"node_modules/diffie-hellman/node_modules/bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
},
"node_modules/dir-glob": { "node_modules/dir-glob": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
@@ -5819,12 +6083,14 @@
} }
}, },
"node_modules/dotenv": { "node_modules/dotenv": {
"version": "10.0.0", "version": "16.4.5",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
"integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
"dev": true,
"engines": { "engines": {
"node": ">=10" "node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
} }
}, },
"node_modules/dotenv-expand": { "node_modules/dotenv-expand": {
@@ -5935,6 +6201,27 @@
"integrity": "sha512-61H9mLzGOCLLVsnLiRzCbc63uldP0AniRYPV3hbGVtONA1pI7qSGILdbofR7A8TMbOypDocEAjH/e+9k1QIe3g==", "integrity": "sha512-61H9mLzGOCLLVsnLiRzCbc63uldP0AniRYPV3hbGVtONA1pI7qSGILdbofR7A8TMbOypDocEAjH/e+9k1QIe3g==",
"dev": true "dev": true
}, },
"node_modules/elliptic": {
"version": "6.5.5",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz",
"integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==",
"dev": true,
"dependencies": {
"bn.js": "^4.11.9",
"brorand": "^1.1.0",
"hash.js": "^1.0.0",
"hmac-drbg": "^1.0.1",
"inherits": "^2.0.4",
"minimalistic-assert": "^1.0.1",
"minimalistic-crypto-utils": "^1.0.1"
}
},
"node_modules/elliptic/node_modules/bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
},
"node_modules/emoji-regex": { "node_modules/emoji-regex": {
"version": "8.0.0", "version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -6693,6 +6980,16 @@
"node": ">=0.8.x" "node": ">=0.8.x"
} }
}, },
"node_modules/evp_bytestokey": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
"integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
"dev": true,
"dependencies": {
"md5.js": "^1.3.4",
"safe-buffer": "^5.1.1"
}
},
"node_modules/execa": { "node_modules/execa": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
@@ -7413,12 +7710,35 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/hash-base": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
"integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==",
"dev": true,
"dependencies": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
},
"engines": {
"node": ">=4"
}
},
"node_modules/hash-sum": { "node_modules/hash-sum": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz",
"integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
"dev": true "dev": true
}, },
"node_modules/hash.js": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
"integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
"dev": true,
"dependencies": {
"inherits": "^2.0.3",
"minimalistic-assert": "^1.0.1"
}
},
"node_modules/hasown": { "node_modules/hasown": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
@@ -7448,6 +7768,17 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/hmac-drbg": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
"integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==",
"dev": true,
"dependencies": {
"hash.js": "^1.0.3",
"minimalistic-assert": "^1.0.0",
"minimalistic-crypto-utils": "^1.0.1"
}
},
"node_modules/hosted-git-info": { "node_modules/hosted-git-info": {
"version": "2.8.9", "version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
@@ -8853,6 +9184,17 @@
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"peer": true "peer": true
}, },
"node_modules/md5.js": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
"integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
"dev": true,
"dependencies": {
"hash-base": "^3.0.0",
"inherits": "^2.0.1",
"safe-buffer": "^5.1.2"
}
},
"node_modules/mdn-data": { "node_modules/mdn-data": {
"version": "2.0.14", "version": "2.0.14",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
@@ -8953,6 +9295,25 @@
"node": ">=8.6" "node": ">=8.6"
} }
}, },
"node_modules/miller-rabin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
"integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
"dev": true,
"dependencies": {
"bn.js": "^4.0.0",
"brorand": "^1.0.1"
},
"bin": {
"miller-rabin": "bin/miller-rabin"
}
},
"node_modules/miller-rabin/node_modules/bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
},
"node_modules/mime": { "node_modules/mime": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
@@ -9071,6 +9432,12 @@
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
"dev": true "dev": true
}, },
"node_modules/minimalistic-crypto-utils": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
"integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==",
"dev": true
},
"node_modules/minimatch": { "node_modules/minimatch": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
@@ -9717,6 +10084,12 @@
"integrity": "sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==", "integrity": "sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==",
"peer": true "peer": true
}, },
"node_modules/os-browserify": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
"integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==",
"dev": true
},
"node_modules/p-finally": { "node_modules/p-finally": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
@@ -9802,6 +10175,23 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/parse-asn1": {
"version": "5.1.7",
"resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz",
"integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==",
"dev": true,
"dependencies": {
"asn1.js": "^4.10.1",
"browserify-aes": "^1.2.0",
"evp_bytestokey": "^1.0.3",
"hash-base": "~3.0",
"pbkdf2": "^3.1.2",
"safe-buffer": "^5.2.1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/parse-json": { "node_modules/parse-json": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
@@ -9859,6 +10249,12 @@
"tslib": "^2.0.3" "tslib": "^2.0.3"
} }
}, },
"node_modules/path-browserify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
"dev": true
},
"node_modules/path-exists": { "node_modules/path-exists": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -9935,6 +10331,22 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/pbkdf2": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
"integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==",
"dev": true,
"dependencies": {
"create-hash": "^1.1.2",
"create-hmac": "^1.1.4",
"ripemd160": "^2.0.1",
"safe-buffer": "^5.0.1",
"sha.js": "^2.4.8"
},
"engines": {
"node": ">=0.12"
}
},
"node_modules/pg-connection-string": { "node_modules/pg-connection-string": {
"version": "2.6.4", "version": "2.6.4",
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz", "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz",
@@ -10841,6 +11253,26 @@
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
}, },
"node_modules/public-encrypt": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
"integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
"dev": true,
"dependencies": {
"bn.js": "^4.1.0",
"browserify-rsa": "^4.0.0",
"create-hash": "^1.1.0",
"parse-asn1": "^5.0.0",
"randombytes": "^2.0.1",
"safe-buffer": "^5.1.2"
}
},
"node_modules/public-encrypt/node_modules/bn.js": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
},
"node_modules/pump": { "node_modules/pump": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
@@ -10953,6 +11385,16 @@
"safe-buffer": "^5.1.0" "safe-buffer": "^5.1.0"
} }
}, },
"node_modules/randomfill": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
"integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
"dev": true,
"dependencies": {
"randombytes": "^2.0.5",
"safe-buffer": "^5.1.0"
}
},
"node_modules/range-parser": { "node_modules/range-parser": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
@@ -11264,6 +11706,16 @@
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/ripemd160": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
"integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
"dev": true,
"dependencies": {
"hash-base": "^3.0.0",
"inherits": "^2.0.1"
}
},
"node_modules/rope-sequence": { "node_modules/rope-sequence": {
"version": "1.3.4", "version": "1.3.4",
"resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.4.tgz", "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.4.tgz",
@@ -11646,6 +12098,19 @@
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
}, },
"node_modules/sha.js": {
"version": "2.4.11",
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"dev": true,
"dependencies": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
},
"bin": {
"sha.js": "bin.js"
}
},
"node_modules/shallow-clone": { "node_modules/shallow-clone": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
@@ -11951,6 +12416,16 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/stream-browserify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",
"integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==",
"dev": true,
"dependencies": {
"inherits": "~2.0.4",
"readable-stream": "^3.5.0"
}
},
"node_modules/string_decoder": { "node_modules/string_decoder": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -12636,6 +13111,11 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/vm-browserify": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
"integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ=="
},
"node_modules/vue": { "node_modules/vue": {
"version": "3.4.29", "version": "3.4.29",
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.29.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.29.tgz",

View File

@@ -27,12 +27,15 @@
"body-parser": "^1.20.2", "body-parser": "^1.20.2",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"cors": "^2.8.5", "cors": "^2.8.5",
"crypto": "^1.0.1",
"dotenv": "^16.4.5",
"express": "^4.19.2", "express": "^4.19.2",
"jsonwebtoken": "^9.0.2", "jsonwebtoken": "^9.0.2",
"mysql2": "^3.10.1", "mysql2": "^3.10.1",
"nodemon": "^3.1.3", "nodemon": "^3.1.3",
"sequelize": "^6.37.3", "sequelize": "^6.37.3",
"sequelize-cli": "^6.6.2", "sequelize-cli": "^6.6.2",
"vm-browserify": "^1.1.2",
"vue": "^3.2.13", "vue": "^3.2.13",
"vue-multiselect": "^3.0.0", "vue-multiselect": "^3.0.0",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
@@ -45,8 +48,13 @@
"@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0", "@vue/cli-service": "~5.0.0",
"crypto-browserify": "^3.12.0",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3" "eslint-plugin-vue": "^8.0.3",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"stream-browserify": "^3.0.0",
"webpack": "^5.92.0"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,

View File

@@ -2,7 +2,7 @@ import axios from 'axios';
import store from './store'; import store from './store';
import router from './router'; import router from './router';
axios.defaults.baseURL = 'http://localhost:3000/api'; axios.defaults.baseURL = process.env.VUE_APP_BACKEND_URL;
axios.interceptors.request.use( axios.interceptors.request.use(
config => { config => {

View File

@@ -93,9 +93,9 @@ export default {
positionIds: positionIds positionIds: positionIds
}; };
if (this.localContactPerson.id) { if (this.localContactPerson.id) {
await axios.put(`http://localhost:3000/api/contact-persons/${this.localContactPerson.id}`, payload); await axios.put(`/contact-persons/${this.localContactPerson.id}`, payload);
} else { } else {
await axios.post('http://localhost:3000/api/contact-persons', payload); await axios.post('/contact-persons', payload);
} }
this.$emit('contactPersonSaved'); this.$emit('contactPersonSaved');

View File

@@ -175,7 +175,7 @@ export default {
}, },
async created() { async created() {
try { try {
const eventTypeResponse = await axios.get('http://localhost:3000/api/event-types'); const eventTypeResponse = await axios.get('/event-types');
this.eventTypes = eventTypeResponse.data; this.eventTypes = eventTypeResponse.data;
this.selectedEventType = this.eventTypes.find(type => type.id === this.event.eventTypeId) || null; this.selectedEventType = this.eventTypes.find(type => type.id === this.event.eventTypeId) || null;
} catch (error) { } catch (error) {
@@ -196,9 +196,9 @@ export default {
payload.dayOfWeek = payload.dayOfWeek.value; payload.dayOfWeek = payload.dayOfWeek.value;
let response; let response;
if (this.eventData.id) { if (this.eventData.id) {
response = await axios.put(`http://localhost:3000/api/events/${this.eventData.id}`, payload); response = await axios.put(`/events/${this.eventData.id}`, payload);
} else { } else {
response = await axios.post('http://localhost:3000/api/events', payload); response = await axios.post('/events', payload);
} }
this.$emit('saved', response.data); this.$emit('saved', response.data);
} catch (error) { } catch (error) {

View File

@@ -89,9 +89,9 @@
async saveInstitution() { async saveInstitution() {
try { try {
if (this.localInstitution.id) { if (this.localInstitution.id) {
await axios.put(`http://localhost:3000/api/institutions/${this.localInstitution.id}`, this.localInstitution); await axios.put(`/institutions/${this.localInstitution.id}`, this.localInstitution);
} else { } else {
await axios.post('http://localhost:3000/api/institutions', this.localInstitution); await axios.post('/institutions', this.localInstitution);
} }
this.$emit('saved'); this.$emit('saved');
this.$emit('cancelled'); this.$emit('cancelled');

View File

@@ -39,10 +39,8 @@ export default {
watch: { watch: {
value(newVal) { value(newVal) {
this.selectedPositions = newVal; this.selectedPositions = newVal;
console.log('PositionSelect - value watch - newVal:', newVal);
}, },
selectedPositions(newVal) { selectedPositions(newVal) {
console.log('PositionSelect - selectedPositions watch - newVal:', newVal);
this.$emit('input', newVal); this.$emit('input', newVal);
} }
}, },
@@ -52,8 +50,7 @@ export default {
methods: { methods: {
async fetchPositions() { async fetchPositions() {
try { try {
const response = await axios.get('http://localhost:3000/api/positions'); const response = await axios.get('/positions');
console.log('PositionSelect - fetchPositions - response.data:', response.data);
this.$emit('update:options', response.data); this.$emit('update:options', response.data);
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Positionen:', error); console.error('Fehler beim Abrufen der Positionen:', error);

View File

@@ -143,7 +143,7 @@ export default {
}, },
async saveMenuData() { async saveMenuData() {
try { try {
await fetch('http://localhost:3000/api/menu-data', { await fetch('/menu-data', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'

View File

@@ -45,7 +45,7 @@ export default {
methods: { methods: {
async fetchContactPersons() { async fetchContactPersons() {
try { try {
const response = await axios.get('http://localhost:3000/api/contact-persons'); const response = await axios.get('/contact-persons');
this.contactPersons = response.data; this.contactPersons = response.data;
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Kontaktpersonen:', error); console.error('Fehler beim Abrufen der Kontaktpersonen:', error);
@@ -53,7 +53,7 @@ export default {
}, },
async fetchPositions() { async fetchPositions() {
try { try {
const response = await axios.get('http://localhost:3000/api/positions'); const response = await axios.get('/positions');
this.positions = response.data; this.positions = response.data;
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Positionen:', error); console.error('Fehler beim Abrufen der Positionen:', error);

View File

@@ -99,7 +99,7 @@ export default {
const fetchPages = async () => { const fetchPages = async () => {
try { try {
const response = await axios.get('http://localhost:3000/api/menu-data'); const response = await axios.get('/menu-data');
pages.value = response.data; pages.value = response.data;
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Seiten:', error); console.error('Fehler beim Abrufen der Seiten:', error);

View File

@@ -65,11 +65,11 @@ export default {
async fetchData() { async fetchData() {
try { try {
const [eventResponse, institutionResponse, eventPlaceResponse, contactPersonResponse, eventTypeResponse] = await Promise.all([ const [eventResponse, institutionResponse, eventPlaceResponse, contactPersonResponse, eventTypeResponse] = await Promise.all([
axios.get('http://localhost:3000/api/events'), axios.get('/events'),
axios.get('http://localhost:3000/api/institutions'), axios.get('/institutions'),
axios.get('http://localhost:3000/api/event-places'), axios.get('/event-places'),
axios.get('http://localhost:3000/api/contact-persons'), axios.get('/contact-persons'),
axios.get('http://localhost:3000/api/event-types') axios.get('/event-types')
]); ]);
this.events = eventResponse.data; this.events = eventResponse.data;
@@ -91,7 +91,7 @@ export default {
}, },
async deleteEvent(id) { async deleteEvent(id) {
try { try {
await axios.delete(`http://localhost:3000/api/events/${id}`); await axios.delete(`/events/${id}`);
this.fetchData(); this.fetchData();
} catch (error) { } catch (error) {
console.error('Fehler beim Löschen der Veranstaltung:', error); console.error('Fehler beim Löschen der Veranstaltung:', error);

View File

@@ -55,25 +55,25 @@ export default {
}, },
methods: { methods: {
async fetchEventPlaces() { async fetchEventPlaces() {
const response = await axios.get('http://localhost:3000/api/event-places'); const response = await axios.get('/event-places');
this.eventPlaces = response.data; this.eventPlaces = response.data;
}, },
async addEventPlace() { async addEventPlace() {
if (this.editMode) { if (this.editMode) {
await axios.put(`http://localhost:3000/api/event-places/${this.editId}`, this.newEventPlace); await axios.put(`/event-places/${this.editId}`, this.newEventPlace);
} else { } else {
const response = await axios.post('http://localhost:3000/api/event-places', this.newEventPlace); const response = await axios.post('/event-places', this.newEventPlace);
this.eventPlaces.push(response.data); this.eventPlaces.push(response.data);
} }
this.resetForm(); this.resetForm();
await this.fetchEventPlaces(); await this.fetchEventPlaces();
}, },
async updateEventPlace(eventPlace) { async updateEventPlace(eventPlace) {
await axios.put(`http://localhost:3000/api/event-places/${eventPlace.id}`, eventPlace); await axios.put(`/event-places/${eventPlace.id}`, eventPlace);
this.fetchEventPlaces(); // Refresh the list this.fetchEventPlaces(); // Refresh the list
}, },
async deleteEventPlace(id) { async deleteEventPlace(id) {
await axios.delete(`http://localhost:3000/api/event-places/${id}`); await axios.delete(`/event-places/${id}`);
this.fetchEventPlaces(); // Refresh the list this.fetchEventPlaces(); // Refresh the list
}, },
editEventPlace(eventPlace) { editEventPlace(eventPlace) {

View File

@@ -35,7 +35,7 @@
methods: { methods: {
async fetchEventTypes() { async fetchEventTypes() {
try { try {
const response = await axios.get('http://localhost:3000/api/event-types'); const response = await axios.get('/event-types');
this.eventTypes = response.data; this.eventTypes = response.data;
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Event-Typen:', error); console.error('Fehler beim Abrufen der Event-Typen:', error);
@@ -44,9 +44,9 @@
async saveEventType() { async saveEventType() {
try { try {
if (this.editMode) { if (this.editMode) {
await axios.put(`http://localhost:3000/api/event-types/${this.editId}`, this.eventTypeData); await axios.put(`/event-types/${this.editId}`, this.eventTypeData);
} else { } else {
const response = await axios.post('http://localhost:3000/api/event-types', this.eventTypeData); const response = await axios.post('/event-types', this.eventTypeData);
this.eventTypes.push(response.data); this.eventTypes.push(response.data);
} }
this.resetForm(); this.resetForm();
@@ -62,7 +62,7 @@
}, },
async deleteEventType(id) { async deleteEventType(id) {
try { try {
await axios.delete(`http://localhost:3000/api/event-types/${id}`); await axios.delete(`/event-types/${id}`);
await this.fetchEventTypes(); await this.fetchEventTypes();
} catch (error) { } catch (error) {
console.error('Fehler beim Löschen des Event-Typs:', error); console.error('Fehler beim Löschen des Event-Typs:', error);

View File

@@ -77,7 +77,7 @@ export default {
methods: { methods: {
async fetchInstitutions() { async fetchInstitutions() {
try { try {
const response = await axios.get('http://localhost:3000/api/institutions'); const response = await axios.get('/institutions');
this.institutions = response.data; this.institutions = response.data;
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Institutionen:', error); console.error('Fehler beim Abrufen der Institutionen:', error);
@@ -85,7 +85,7 @@ export default {
}, },
async fetchContactPersons() { async fetchContactPersons() {
try { try {
const response = await axios.get('http://localhost:3000/api/contact-persons'); const response = await axios.get('/contact-persons');
this.contactPersons = response.data; this.contactPersons = response.data;
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Kontaktpersonen:', error); console.error('Fehler beim Abrufen der Kontaktpersonen:', error);
@@ -94,9 +94,9 @@ export default {
async saveInstitution() { async saveInstitution() {
try { try {
if (this.editMode) { if (this.editMode) {
await axios.put(`http://localhost:3000/api/institutions/${this.editId}`, this.institutionData); await axios.put(`/institutions/${this.editId}`, this.institutionData);
} else { } else {
const response = await axios.post('http://localhost:3000/api/institutions', this.institutionData); const response = await axios.post('/institutions', this.institutionData);
this.institutions.push(response.data); this.institutions.push(response.data);
} }
this.resetForm(); this.resetForm();
@@ -113,7 +113,7 @@ export default {
}, },
async deleteInstitution(id) { async deleteInstitution(id) {
try { try {
await axios.delete(`http://localhost:3000/api/institutions/${id}`); await axios.delete(`/institutions/${id}`);
this.fetchInstitutions(); this.fetchInstitutions();
} catch (error) { } catch (error) {
console.error('Fehler beim Löschen der Institution:', error); console.error('Fehler beim Löschen der Institution:', error);

View File

@@ -43,25 +43,25 @@ export default {
}, },
methods: { methods: {
async fetchPositions() { async fetchPositions() {
const response = await axios.get('http://localhost:3000/api/positions'); const response = await axios.get('/positions');
this.positions = response.data; this.positions = response.data;
}, },
async addPosition() { async addPosition() {
if (this.editMode) { if (this.editMode) {
await axios.put(`http://localhost:3000/api/positions/${this.editId}`, this.newPosition); await axios.put(`/positions/${this.editId}`, this.newPosition);
} else { } else {
const response = await axios.post('http://localhost:3000/api/positions', this.newPosition); const response = await axios.post('/positions', this.newPosition);
this.positions.push(response.data); this.positions.push(response.data);
} }
this.resetForm(); this.resetForm();
await this.fetchPositions(); await this.fetchPositions();
}, },
async updatePosition(position) { async updatePosition(position) {
await axios.put(`http://localhost:3000/api/positions/${position.id}`, position); await axios.put(`/positions/${position.id}`, position);
this.fetchPositions(); // Refresh the list this.fetchPositions(); // Refresh the list
}, },
async deletePosition(id) { async deletePosition(id) {
await axios.delete(`http://localhost:3000/api/positions/${id}`); await axios.delete(`/positions/${id}`);
this.fetchPositions(); // Refresh the list this.fetchPositions(); // Refresh the list
}, },
editPosition(position) { editPosition(position) {

View File

@@ -90,7 +90,7 @@ export default {
formatDate, formatDate,
async fetchWorships() { async fetchWorships() {
try { try {
const response = await axios.get('http://localhost:3000/api/worships'); const response = await axios.get('/worships');
this.worships = response.data; this.worships = response.data;
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Gottesdienste:', error); console.error('Fehler beim Abrufen der Gottesdienste:', error);
@@ -98,7 +98,7 @@ export default {
}, },
async fetchEventPlaces() { async fetchEventPlaces() {
try { try {
const response = await axios.get('http://localhost:3000/api/event-places'); const response = await axios.get('/event-places');
this.eventPlaces = response.data; this.eventPlaces = response.data;
} catch (error) { } catch (error) {
console.error('Fehler beim Abrufen der Veranstaltungsorte:', error); console.error('Fehler beim Abrufen der Veranstaltungsorte:', error);
@@ -112,9 +112,9 @@ export default {
}; };
if (this.editMode) { if (this.editMode) {
await axios.put(`http://localhost:3000/api/worships/${this.editId}`, payload); await axios.put(`/worships/${this.editId}`, payload);
} else { } else {
await axios.post('http://localhost:3000/api/worships', payload); await axios.post('/worships', payload);
} }
this.resetForm(); this.resetForm();
@@ -131,7 +131,7 @@ export default {
}, },
async deleteWorship(id) { async deleteWorship(id) {
try { try {
await axios.delete(`http://localhost:3000/api/worships/${id}`); await axios.delete(`/worships/${id}`);
await this.fetchWorships(); await this.fetchWorships();
} catch (error) { } catch (error) {
console.error('Fehler beim Löschen des Gottesdienstes:', error); console.error('Fehler beim Löschen des Gottesdienstes:', error);

View File

@@ -48,22 +48,15 @@ export default {
...mapActions(['login']), ...mapActions(['login']),
async runLogin() { async runLogin() {
try { try {
const response = await axios.post('http://localhost:3000/api/auth/login', { const response = await axios.post('/auth/login', {
email: this.email, email: this.email,
password: this.password password: this.password
}); });
console.log(1);
const token = response.data.token; const token = response.data.token;
console.log(2);
const data = response.data; const data = response.data;
console.log(3);
localStorage.setItem('token', token); localStorage.setItem('token', token);
console.log(4);
console.log(data);
this.login(data.user); this.login(data.user);
console.log(5);
axios.defaults.headers.common['Authorization'] = `Bearer ${token}`; axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
console.log(6);
this.$router.push('/admin'); this.$router.push('/admin');
} catch (error) { } catch (error) {
if (error.response) { if (error.response) {

View File

@@ -2,16 +2,16 @@ import { createApp } from 'vue';
import AppComponent from './AppComponent.vue'; import AppComponent from './AppComponent.vue';
import router from './router'; import router from './router';
import store from './store'; import store from './store';
import axios from './axios'; // Korrigieren Sie den Import-Pfad hier import axios from './axios';
import './assets/css/editor.css'; // Hier deine CSS-Datei einbinden import './assets/css/editor.css';
async function fetchMenuData() { async function fetchMenuData() {
const response = await fetch('http://localhost:3000/api/menu-data'); const response = await fetch(process.env.VUE_APP_BACKEND_URL + '/menu-data');
return await response.json(); return await response.json();
} }
fetchMenuData().then(menuData => { fetchMenuData().then(menuData => {
store.commit('setMenuData', menuData); store.commit('setMenuData', menuData);
}); });
const app = createApp(AppComponent); const app = createApp(AppComponent);

View File

@@ -19,19 +19,12 @@ export default createStore({
}, },
mutations: { mutations: {
setLogin(state, { user, token }) { setLogin(state, { user, token }) {
console.log(1);
state.isLoggedIn = true; state.isLoggedIn = true;
console.log(2);
state.user = user; state.user = user;
console.log(3);
state.token = token; state.token = token;
console.log(4);
localStorage.setItem('isLoggedIn', 'true'); localStorage.setItem('isLoggedIn', 'true');
console.log(5);
localStorage.setItem('user', JSON.stringify(user)); localStorage.setItem('user', JSON.stringify(user));
console.log(6);
localStorage.setItem('token', token); localStorage.setItem('token', token);
console.log(7);
}, },
logout(state) { logout(state) {
state.isLoggedIn = false; state.isLoggedIn = false;
@@ -55,7 +48,7 @@ export default createStore({
actions: { actions: {
async loadMenuData({ commit }) { async loadMenuData({ commit }) {
try { try {
const response = await fetch('http://localhost:3000/api/menu-data'); const response = await fetch('/menu-data');
const menuData = await response.json(); const menuData = await response.json();
commit('setMenuData', menuData); commit('setMenuData', menuData);
} catch (error) { } catch (error) {
@@ -64,7 +57,7 @@ export default createStore({
}, },
async loadPageContent({ commit }, link) { async loadPageContent({ commit }, link) {
try { try {
const response = await axios.get(`http://localhost:3000/api/page-content?link=${link}`); const response = await axios.get(`/page-content?link=${link}`);
commit('SET_PAGE_CONTENT', response.data.content || ''); commit('SET_PAGE_CONTENT', response.data.content || '');
} catch (error) { } catch (error) {
console.error('Fehler beim Laden des Seiteninhalts:', error); console.error('Fehler beim Laden des Seiteninhalts:', error);
@@ -74,7 +67,7 @@ export default createStore({
try { try {
const contentToSave = state.pageContent; const contentToSave = state.pageContent;
await axios.post('http://localhost:3000/api/page-content', { await axios.post('/page-content', {
link, link,
name, name,
content: contentToSave, content: contentToSave,
@@ -86,7 +79,6 @@ export default createStore({
} }
}, },
login({ commit }, { user, token }) { login({ commit }, { user, token }) {
console.log('do login');
commit('setLogin', { user, token }); commit('setLogin', { user, token });
}, },
logout({ commit }) { logout({ commit }) {

View File

@@ -1,9 +1,26 @@
const { defineConfig } = require('@vue/cli-service') const { defineConfig } = require('@vue/cli-service');
const webpack = require('webpack');
module.exports = defineConfig({ module.exports = defineConfig({
transpileDependencies: true, transpileDependencies: true,
devServer: { devServer: {
host: '127.0.0.1', host: '127.0.0.1',
port: 8080 port: 8080
} },
}) configureWebpack: {
resolve: {
fallback: {
"path": require.resolve("path-browserify"),
"os": require.resolve("os-browserify/browser"),
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
"vm": require.resolve("vm-browserify"),
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': JSON.stringify(process.env)
}),
],
},
});