From 332495bd5bc35290dc592623e01fa1365beeda90 Mon Sep 17 00:00:00 2001 From: shin0729 Date: Mon, 8 Apr 2024 20:21:24 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=E7=A2=BA=E5=AE=9F=E3=81=AB=E4=B8=80?= =?UTF-8?q?=E8=A1=8C=E3=82=92=E8=BF=94=E3=81=99=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typing-server/api/repository/score.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typing-server/api/repository/score.go b/typing-server/api/repository/score.go index b398193..10d5868 100644 --- a/typing-server/api/repository/score.go +++ b/typing-server/api/repository/score.go @@ -221,7 +221,7 @@ func GetMaxScoreByUserID(ctx context.Context, client *ent.Client, userID uuid.UU return nil, fmt.Errorf("invalid sort by parameter: %s", sortBy) } - maxScore, err := query.First(ctx) + maxScore, err := query.Only(ctx) if err != nil { return nil, err }