dcsunny 4 anni fa
parent
commit
767e0a0e43
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      http/middleware/rpc_value.go

+ 2 - 2
http/middleware/rpc_value.go

@@ -23,13 +23,13 @@ func GrpcValue(handler middleware.Handler) middleware.Handler {
 			}
 
 			accountID := md.Get("account_id")
-			if len(userID) > 0 {
+			if len(accountID) > 0 {
 				_accountID, _ := strconv.ParseInt(accountID[0], 10, 64)
 				ctx = context2.AppendToContext(ctx, "account_id", _accountID)
 			}
 
 			memID := md.Get("mem_id")
-			if len(userID) > 0 {
+			if len(memID) > 0 {
 				_memID, _ := strconv.ParseInt(memID[0], 10, 64)
 				ctx = context2.AppendToContext(ctx, "mem_id", _memID)
 			}