Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6d0c7ec

Browse files
committed
F
1 parent 3056534 commit 6d0c7ec

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

‎api/views.py‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,27 @@
99

1010

1111
def authData(request ):
12-
payload = request.GET.get('payload')
12+
if(request.method == "DELETE"):
13+
body_unicode = request.body.decode('utf-8')
14+
body = json.loads(body_unicode)
15+
payload = body['payload']
16+
17+
18+
if(request.method == "PUT"):
19+
body_unicode = request.body.decode('utf-8')
20+
body = json.loads(body_unicode)
21+
payload = body['payload']
22+
23+
24+
if(request.method == "GET"):
25+
payload = request.GET.get('payload')
26+
27+
1328
x = payload.split("=")
1429
y = x[1].split(".")
1530
decoded = url64.decode(y[0])
16-
1731
json_object = json.loads(decoded)
1832
__store_hash =json_object["store_hash"]
19-
2033
authData = get_object_or_404(Auth, storehash = __store_hash)
2134
token = authData.token
2235
headers = {'X-Auth-Token': token , 'Accept': 'application/json', 'host':'api.bigcommerce.com' ,'Content-Type': 'application/json'}

‎src/components/orderList.jsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function orderUpdate(orderId) {
2828
headers: {
2929
"Content-Type": "application/json",
3030
},
31-
body: JSON.stringify({ status_id: 5 }),
31+
body: JSON.stringify({ status_id: 5,payload: payload }),
3232
});
3333
}
3434

@@ -39,6 +39,7 @@ function orderDelete(orderId) {
3939
headers: {
4040
"Content-Type": "application/json",
4141
},
42+
body: JSON.stringify({ payload: payload }),
4243
});
4344
}
4445

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /