Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Vasilis
2022-02-03 11:59:12 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ec6dd17a0c037384ecd6deb4b53165c4d4b0a45b
ec6dd17a
1 parent
aac45cd4
fixes at getProfile(embed refreshToken)
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
WarplySDKFrameworkIOS/Warply/Warply.m
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/billskouras.xcuserdatad/UserInterfaceState.xcuserstate
WarplySDKFrameworkIOS/Warply/Warply.m
View file @
ec6dd17
...
...
@@ -684,7 +684,7 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
if
(
failure
)
{
if
([
error
isEqual
:@{
@"code"
:
@401
}])
{
[
self
refreshToken
:
^
(
NSDictionary
*
response
)
{
// [_db executeUpdate:@"
INSERT INTO requestVariables (access_token, refresh_token) VALUES (?, ?)
", [response objectForKey:@"access_token"], [response objectForKey:@"refresh_token"]];
// [_db executeUpdate:@"
UPDATE requestVariables SET access_token = ?, refresh_token = ? WHERE id = 1
", [response objectForKey:@"access_token"], [response objectForKey:@"refresh_token"]];
NSDictionary
*
successResponse
=
@{
@"result"
:
@"success"
,
@"status"
:
@1
};
success
(
successResponse
);
}
failureBlock
:
^
(
NSError
*
error
)
{
...
...
@@ -726,7 +726,24 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
}
}
failureBlock
:^
(
NSError
*
error
)
{
if
(
failure
)
{
failure
(
error
);
if
([
error
isEqual
:@{
@"code"
:
@401
}])
{
[
self
refreshToken
:
^
(
NSDictionary
*
response
)
{
[
self
sendContext8
:
jsonData
successBlock
:
^
(
NSDictionary
*
contextResponse
)
{
if
(
success
)
{
success
(
contextResponse
);
}
}
failureBlock
:^
(
NSError
*
error
)
{
if
(
failure
)
{
failure
(
error
);
}
}];
}
failureBlock
:
^
(
NSError
*
error
)
{
if
(
failure
)
{
[
_db
executeUpdate
:
@"DROP TABLE requestVariables"
];
failure
(
error
);
}
NSLog
(
@"Error at token %@"
,
error
);
}];
}
NSLog
(
@"Error at get profile %@"
,
error
);
}];
...
...
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/billskouras.xcuserdatad/UserInterfaceState.xcuserstate
View file @
ec6dd17
No preview for this file type
Please
register
or
login
to post a comment