Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ecommerce-maven
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
ecommerce-maven
Commits
8dc817c7
Commit
8dc817c7
authored
May 11, 2021
by
Kyle Muldoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
done with AFP-68
parent
754319bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
checkout_actions.js
ecom-web/src/actions/checkout_actions.js
+3
-11
order-api.js
ecom-web/src/util/order-api.js
+1
-3
No files found.
ecom-web/src/actions/checkout_actions.js
View file @
8dc817c7
...
@@ -4,18 +4,10 @@ import { sendOrderPost } from './../util/order-api';
...
@@ -4,18 +4,10 @@ import { sendOrderPost } from './../util/order-api';
export
const
SEND_USER_ORDER
=
"SEND_USER_ORDER"
export
const
SEND_USER_ORDER
=
"SEND_USER_ORDER"
const
sendUserOrder
=
orderConfirmationResponse
=>
({
const
sendUserOrder
=
(
orderConfirmationResponse
)
=>
({
type
:
SEND_USER_ORDER
,
type
:
SEND_USER_ORDER
,
payload
:
orderConfirmationResponse
payload
:
orderConfirmationResponse
})
})
export
const
dispatchOrderInfo
=
(
orderInfo
)
=>
dispatch
=>
sendOrderPost
(
orderInfo
)
export
const
dispatchOrderInfo
=
(
orderInfo
)
=>
{
.
then
(
response
=>
dispatch
(
sendUserOrder
(
response
))
)
const
response
=
sendOrderPost
(
orderInfo
)
return
sendUserOrder
(
response
);
}
// export const fetchAllCartItems = () => dispatch => ApiUtil.fetchCartItems()
// .then(cartItems => dispatch(receiveAllCartItems(cartItems)))
ecom-web/src/util/order-api.js
View file @
8dc817c7
import
axios
from
'axios'
import
axios
from
'axios'
export
const
sendOrderPost
=
(
order
)
=>
{
export
const
sendOrderPost
=
(
order
)
=>
{
const
response
=
axios
.
post
(
"http://localhost:8080/api/orders"
,
order
)
return
axios
.
post
(
"http://localhost:8080/api/orders"
,
order
)
.
then
((
res
)
=>
res
.
data
)
return
response
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment