Explorar el Código

Update auth.go, change int to int64

lily-lee hace 7 años
padre
commit
7b63f10703
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1
    1
      middleware/auth/auth.go
  2. 1
    1
      middleware/auth/optional_auth.go

+ 1
- 1
middleware/auth/auth.go Ver fichero

63
 			}
63
 			}
64
 
64
 
65
 			if uid, ok := mapClaims[CtxRequestHeaderUserId].(float64); ok {
65
 			if uid, ok := mapClaims[CtxRequestHeaderUserId].(float64); ok {
66
-				ctx.Set(CtxRequestHeaderUserId, int(uid))
66
+				ctx.Set(CtxRequestHeaderUserId, int64(uid))
67
 			}
67
 			}
68
 		}
68
 		}
69
 	}
69
 	}

+ 1
- 1
middleware/auth/optional_auth.go Ver fichero

51
 			}
51
 			}
52
 
52
 
53
 			if uid, ok := mapClaims[CtxRequestHeaderUserId].(float64); ok {
53
 			if uid, ok := mapClaims[CtxRequestHeaderUserId].(float64); ok {
54
-				ctx.Set(CtxRequestHeaderUserId, int(uid))
54
+				ctx.Set(CtxRequestHeaderUserId, int64(uid))
55
 			}
55
 			}
56
 		}
56
 		}
57
 	}
57
 	}