mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #80 from gradido/use_correct_send_api
use_correct_send_api
This commit is contained in:
commit
1df0aada16
@ -38,7 +38,7 @@ const communityAPI = {
|
||||
transactions: async (session_id) => {
|
||||
return apiGet(CONFIG.COMMUNITY_API_STATE_BALANCE_URL + 'ajaxListTransactions/' + session_id)
|
||||
},
|
||||
create: async (session_id, email, amount, memo, target_date = new Date() ) => {
|
||||
/*create: async (session_id, email, amount, memo, target_date = new Date() ) => {
|
||||
const payload = {
|
||||
session_id,
|
||||
email,
|
||||
@ -48,6 +48,16 @@ const communityAPI = {
|
||||
auto_sign: true
|
||||
}
|
||||
return apiPost(CONFIG.COMMUNITY_API_TRANSACTION_CREATION_URL + 'ajaxCreate/', payload)
|
||||
},*/
|
||||
send: async (session_id, email, amount, memo ) => {
|
||||
const payload = {
|
||||
session_id,
|
||||
email,
|
||||
amount,
|
||||
memo,
|
||||
auto_sign: true
|
||||
}
|
||||
return apiPost(CONFIG.COMMUNITY_API_TRANSACTION_SEND_COINS + 'ajaxCreate/', payload)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,8 +12,8 @@ const environment = {
|
||||
const server = {
|
||||
LOGIN_API_URL: process.env.LOGIN_API_URL || 'http://localhost/login_api/',
|
||||
COMMUNITY_API_STATE_BALANCE_URL: process.env.COMMUNITY_API_STATE_BALANCE_URL || 'http://localhost/state-balances/',
|
||||
COMMUNITY_API_TRANSACTION_CREATION_URL: process.env.COMMUNITY_API_TRANSACTION_CREATION_URL || 'http://localhost/transaction-creations/',
|
||||
// TODO is this the right API call? what does it do?
|
||||
// Schöpfung
|
||||
// COMMUNITY_API_TRANSACTION_CREATION_URL: process.env.COMMUNITY_API_TRANSACTION_CREATION_URL || 'http://localhost/transaction-creations/',
|
||||
COMMUNITY_API_TRANSACTION_SEND_COINS: process.env.COMMUNITY_API_TRANSACTION_SEND_COINS || 'http://localhost/transaction-send-coins/',
|
||||
}
|
||||
|
||||
|
||||
@ -136,9 +136,9 @@ export const store = new Vuex.Store({
|
||||
router.push('/Login')
|
||||
},
|
||||
ajaxCreate: async ({ dispatch, state }) => {
|
||||
//console.log('action: ajaxCreate')
|
||||
console.log('action: ajaxCreate')
|
||||
state.ajaxCreateData.amount = (state.ajaxCreateData.amount)*10000
|
||||
const result = await communityAPI.create($cookies.get("gdd_session_id", email, amount, memo))
|
||||
const result = await communityAPI.send(state.session_id, state.ajaxCreateData.email, state.ajaxCreateData.amount, state.ajaxCreateData.memo)
|
||||
console.log(result)
|
||||
},
|
||||
ajaxListTransactions: async ({commit, dispatch, state}) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user