Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
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
cemarose
shopify_iossdk
Commits
ea7bfafd
Commit
ea7bfafd
authored
May 31, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant responseCode check in unnecessary method.
parent
dc2579cb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
BUYRequestOperation.m
...e Buy SDK/Mobile Buy SDK/Operations/BUYRequestOperation.m
+2
-12
No files found.
Mobile Buy SDK/Mobile Buy SDK/Operations/BUYRequestOperation.m
View file @
ea7bfafd
...
@@ -169,8 +169,8 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
...
@@ -169,8 +169,8 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
}
}
NSHTTPURLResponse
*
httpResponse
=
(
NSHTTPURLResponse
*
)
response
;
NSHTTPURLResponse
*
httpResponse
=
(
NSHTTPURLResponse
*
)
response
;
if
(
!
error
)
{
if
(
!
error
&&
!
httpResponse
.
successful
)
{
error
=
[
self
errorFromJSON
:
json
response
:
httpResponse
];
error
=
[
[
NSError
alloc
]
initWithDomain
:
BUYShopifyErrorDomain
code
:
httpResponse
.
statusCode
userInfo
:
json
];
}
}
completion
(
json
,
httpResponse
,
error
);
completion
(
json
,
httpResponse
,
error
);
...
@@ -178,14 +178,4 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
...
@@ -178,14 +178,4 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
return
task
;
return
task
;
}
}
#pragma mark - Error -
-
(
NSError
*
)
errorFromJSON
:
(
NSDictionary
*
)
json
response
:
(
NSHTTPURLResponse
*
)
response
{
if
((
int
)(
response
.
statusCode
/
100
.
0
)
!=
2
)
{
// If not a 2xx response code
return
[[
NSError
alloc
]
initWithDomain
:
BUYShopifyErrorDomain
code
:
response
.
statusCode
userInfo
:
json
];
}
return
nil
;
}
@end
@end
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