dcsunny 4 년 전
부모
커밋
767e0a0e43
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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)
 			}