File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 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 {
108108 if fb .XAuthToken == "" {
109109 return fb
110110 }
111+ fb .RestClient .SetBaseURL ("https://" + fb .EndPoint + "/api" )
111112 _ , err := fb .RestClient .R ().
112113 SetHeader ("x-auth-token" , fb .XAuthToken ).
113114 Post ("/logout" )
114115 if err != nil {
115116 fb .Error = err
116117 }
118+ fb .RestClient .SetBaseURL ("https://" + fb .EndPoint + "/api/" + fb .ApiVersion )
117119 return fb
118120}
119121
120122func (fb * FBClient ) RefreshSession () * FBClient {
123+ fb .RestClient .SetBaseURL ("https://" + fb .EndPoint + "/api" )
121124 res , err := fb .RestClient .R ().
122125 SetHeader ("api-token" , fb .ApiToken ).
123126 Post ("/login" )
@@ -127,5 +130,6 @@ func (fb *FBClient) RefreshSession() *FBClient {
127130 }
128131 fb .XAuthToken = res .Header ().Get ("x-auth-token" )
129132 fb .RestClient .SetHeader ("x-auth-token" , fb .XAuthToken )
133+ fb .RestClient .SetBaseURL ("https://" + fb .EndPoint + "/api/" + fb .ApiVersion )
130134 return fb
131135}
You can’t perform that action at this time.
0 commit comments