-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: 유저 닉네임 조회 추가 #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,23 @@ | ||
| package flipnote.group.application.port.in.result; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| import flipnote.group.adapter.out.entity.JoinEntity; | ||
| import flipnote.group.domain.model.join.JoinInfo; | ||
| import flipnote.user.grpc.GetUserResponse; | ||
|
|
||
| public record FindJoinFormListResult( | ||
| List<JoinInfo> joinInfoList | ||
| ) { | ||
| public static FindJoinFormListResult of(List<JoinEntity> joinDomainList) { | ||
| public static FindJoinFormListResult of(List<JoinEntity> joinList, Map<Long, GetUserResponse> userMap) { | ||
|
|
||
| List<JoinInfo> joinInfoList = joinDomainList.stream() | ||
| .map(JoinInfo::of) | ||
| List<JoinInfo> results = joinList.stream() | ||
| .map(join -> { | ||
| GetUserResponse user = userMap.get(join.getUserId()); | ||
| return JoinInfo.of(join, user.getNickname()); | ||
| }) | ||
| .toList(); | ||
|
|
||
| return new FindJoinFormListResult(joinInfoList); | ||
| return new FindJoinFormListResult(results); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package flipnote.group.domain.model.join; | ||
|
|
||
| import flipnote.group.adapter.out.entity.JoinEntity; | ||
|
|
||
| public record JoinMyInfo( | ||
| Long groupJoinId, | ||
| String joinIntro, | ||
| JoinStatus status | ||
| ) { | ||
| public static JoinMyInfo of(JoinEntity join) { | ||
| return new JoinMyInfo(join.getId(), join.getForm(), join.getStatus()); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| option java_package = "flipnote.user.grpc"; | ||
| option java_outer_classname = "UserQueryProto"; | ||
| option java_multiple_files = true; | ||
|
|
||
| package user_query; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# First, check if proto directory exists and list files
echo "=== Proto files structure ==="
if [ -d "src/main/proto" ]; then
find src/main/proto -type f -name "*.proto" | head -20
else
echo "Directory src/main/proto not found"
fi
echo ""
echo "=== Running package-directory mismatch check ==="
python3 <<'PY'
from pathlib import Path
root = Path("src/main/proto")
if not root.exists():
print(f"Root path {root} does not exist")
else:
violations = []
for p in sorted(root.rglob("*.proto")):
pkg = None
try:
content = p.read_text(encoding="utf-8")
for line in content.splitlines():
s = line.strip()
if s.startswith("package ") and s.endswith(";"):
pkg = s[len("package "):-1].strip()
break
except Exception as e:
print(f"Error reading {p}: {e}")
continue
if not pkg:
print(f"No package found in {p}")
continue
expected_dir = root / pkg.replace(".", "/")
if p.parent != expected_dir:
violations.append({
'file': str(p),
'package': pkg,
'expected_dir': str(expected_dir),
'actual_dir': str(p.parent)
})
if violations:
print(f"Found {len(violations)} PACKAGE_DIRECTORY_MATCH violation(s):")
for v in violations:
print(f" - File: {v['file']}")
print(f" Package: {v['package']}")
print(f" Expected dir: {v['expected_dir']}")
print(f" Actual dir: {v['actual_dir']}")
else:
print("No PACKAGE_DIRECTORY_MATCH violations found")
PYRepository: FlipNoteTeam/FlipNote-Group Length of output: 675 🏁 Script executed: cat src/main/proto/user.protoRepository: FlipNoteTeam/FlipNote-Group Length of output: 682
🧰 Tools🪛 Buf (1.65.0)[error] 7-7: Files with package "user_query" must be within a directory "user_query" relative to root but were in directory "src/main/proto". (PACKAGE_DIRECTORY_MATCH) 🤖 Prompt for AI Agents |
||
|
|
||
| service UserQueryService { | ||
| rpc GetUser(GetUserRequest) returns (GetUserResponse); | ||
| rpc GetUsers(GetUsersRequest) returns (GetUsersResponse); | ||
| } | ||
|
|
||
| message GetUserRequest { | ||
| int64 user_id = 1; | ||
| } | ||
|
|
||
| message GetUserResponse { | ||
| int64 id = 1; | ||
| string email = 2; | ||
| string nickname = 3; | ||
| string profile_image_url = 4; | ||
| } | ||
|
Comment on lines
+18
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 현재 사용 목적 대비 응답 스키마가 과도하게 넓습니다. 닉네임 매핑 용도인데 🤖 Prompt for AI Agents |
||
|
|
||
| message GetUsersRequest { | ||
| repeated int64 user_ids = 1; | ||
| } | ||
|
|
||
| message GetUsersResponse { | ||
| repeated GetUserResponse users = 1; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.