mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
back to master
This commit is contained in:
parent
15f43d7351
commit
34e2a4672b
@ -121,13 +121,13 @@ services:
|
||||
#########################################################
|
||||
## GRADIDO NODE test ###################################
|
||||
#########################################################
|
||||
gradido-node-test:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./gn/docker/deprecated-hedera-node/Dockerfile
|
||||
container_name: gn-test
|
||||
working_dir: /opt/gn/build
|
||||
command: ["./unit_tests"]
|
||||
# gradido-node-test:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./gn/docker/deprecated-hedera-node/Dockerfile
|
||||
# container_name: gn-test
|
||||
# working_dir: /opt/gn/build
|
||||
# command: ["./unit_tests"]
|
||||
|
||||
networks:
|
||||
external-net:
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
import axios from 'axios';
|
||||
import CONFIG from '../config'
|
||||
|
||||
// axios.defaults.withCredentials = true. Dies ist erforderlich, da Axios standardmäßig keine Cookies weitergibt.
|
||||
// axios.defaults.withCredentials = true ist eine Anweisung an Axios, alle Anfragen mit Anmeldeinformationen zu senden,
|
||||
// wie z. Autorisierungsheader, TLS-Client-Zertifikate oder Cookies (wie in unserem Fall).
|
||||
axios.defaults.withCredentials = true
|
||||
|
||||
//Wir setzen unsere axios.defaults.baseURL für unsere Axios-Anfrage auf unsere.
|
||||
// Auf APIdiese Weise wird diese Basis-URL verwendet, wenn wir über Axios senden. Damit können wir nur unsere Endpunkte wie /registerund /loginzu unseren Aktionen hinzufügen, ohne jedes Mal die vollständige URL anzugeben.
|
||||
axios.defaults.baseURL = CONFIG.COMMUNITY_API_STATE_BALANCE_URL
|
||||
|
||||
const apiGet = async (url) => {
|
||||
try {
|
||||
const result = await axios.get(url);
|
||||
|
||||
@ -7,9 +7,6 @@ const EMAIL_TYPE = {
|
||||
ADMIN: 5, // if user was registered by an admin
|
||||
}
|
||||
|
||||
// axios.defaults.withCredentials = true. Dies ist erforderlich, da Axios standardmäßig keine Cookies weitergibt.
|
||||
axios.defaults.withCredentials = true
|
||||
|
||||
const apiPost = async (url, payload) => {
|
||||
try {
|
||||
const result = await axios.post(url, payload);
|
||||
|
||||
@ -5,9 +5,8 @@ import router from '../routes/router.js'
|
||||
import loginAPI from '../apis/loginAPI'
|
||||
import communityAPI from '../apis/communityAPI'
|
||||
import axios from 'axios'
|
||||
// import CONFIG from '../config'
|
||||
|
||||
// axios.defaults.withCredentials = true. Dies ist erforderlich, da Axios standardmäßig keine Cookies weitergibt.
|
||||
axios.defaults.withCredentials = true
|
||||
|
||||
export const store = new Vuex.Store({
|
||||
state: {
|
||||
@ -27,7 +26,14 @@ export const store = new Vuex.Store({
|
||||
auto_sign: true
|
||||
},
|
||||
transactions: [],
|
||||
modals: false
|
||||
modals: false,
|
||||
optionAxios: {
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Credentials': 'true'
|
||||
}
|
||||
}
|
||||
},
|
||||
// Retrieve a state variable
|
||||
getters: {
|
||||
@ -62,19 +68,21 @@ export const store = new Vuex.Store({
|
||||
actions: {
|
||||
login: async ({ dispatch, commit }, data) => {
|
||||
console.log('action: login')
|
||||
console.log('action: data', data.email)
|
||||
|
||||
const result = await loginAPI.login(data.email,data.password)
|
||||
console.log('result',result)
|
||||
console.log('result.success',result.success)
|
||||
if( result.success ){
|
||||
commit('session_id', result.result.data.session_id)
|
||||
commit('email', data.email)
|
||||
$cookies.set('gdd_session_id', result.result.data.session_id);
|
||||
$cookies.set('gdd_u', data.email);
|
||||
router.push('/overview')
|
||||
} else {
|
||||
// Register failed, we perform a logout
|
||||
dispatch('logout')
|
||||
}
|
||||
// if( result.success ){
|
||||
// commit('session_id', result.result.data.session_id)
|
||||
// commit('email', data.email)
|
||||
// $cookies.set('gdd_session_id', result.result.data.session_id);
|
||||
// $cookies.set('gdd_u', data.email);
|
||||
// router.push('/overview')
|
||||
// } else {
|
||||
// // Register failed, we perform a logout
|
||||
// dispatch('logout')
|
||||
// }
|
||||
},
|
||||
passwordReset: async (data) => {
|
||||
console.log("<<<<<<<<<<< PASSWORT RESET TODO >>>>>>>>>>>", data.email)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user