File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,19 @@ func (fb *FBClient) Close() *FBClient {
108
108
if fb .XAuthToken == "" {
109
109
return fb
110
110
}
111
+ fb .RestClient .SetBaseURL ("https://" + fb .EndPoint + "/api" )
111
112
_ , err := fb .RestClient .R ().
112
113
SetHeader ("x-auth-token" , fb .XAuthToken ).
113
114
Post ("/logout" )
114
115
if err != nil {
115
116
fb .Error = err
116
117
}
118
+ fb .RestClient .SetBaseURL ("https://" + fb .EndPoint + "/api/" + fb .ApiVersion )
117
119
return fb
118
120
}
119
121
120
122
func (fb * FBClient ) RefreshSession () * FBClient {
123
+ fb .RestClient .SetBaseURL ("https://" + fb .EndPoint + "/api" )
121
124
res , err := fb .RestClient .R ().
122
125
SetHeader ("api-token" , fb .ApiToken ).
123
126
Post ("/login" )
@@ -127,5 +130,6 @@ func (fb *FBClient) RefreshSession() *FBClient {
127
130
}
128
131
fb .XAuthToken = res .Header ().Get ("x-auth-token" )
129
132
fb .RestClient .SetHeader ("x-auth-token" , fb .XAuthToken )
133
+ fb .RestClient .SetBaseURL ("https://" + fb .EndPoint + "/api/" + fb .ApiVersion )
130
134
return fb
131
135
}
You can’t perform that action at this time.
0 commit comments