mirror of
https://github.com/wahyd4/say-it-backend.git
synced 2026-08-08 21:07:38 +10:00
fix the issue of cant refresh token
This commit is contained in:
@@ -1 +1,2 @@
|
||||
token.json
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ func landing(c *gin.Context) {
|
||||
func fetchTokenHandler(c *gin.Context) {
|
||||
if time.Now().After(token.ExpiresTime) {
|
||||
log.Info("Token expires, try to refresh one.")
|
||||
// fetchToken()
|
||||
fetchToken()
|
||||
}
|
||||
if token != nil {
|
||||
c.JSON(200, ViewToken{Token: token.AccessToken, ExpiresTime: token.ExpiresTime.Unix()})
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user