From ef85c50a9c70fc236221979e57697f10b1ff591c Mon Sep 17 00:00:00 2001 From: rei Date: Sat, 28 Dec 2024 21:32:56 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20RequestQuery=20=E3=81=AE=20CreatedBy=20?= =?UTF-8?q?=E3=81=8C=E5=89=8A=E9=99=A4=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/request.go | 19 ++++++++++--------- router/request.go | 19 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/model/request.go b/model/request.go index d38de723..94460dc2 100644 --- a/model/request.go +++ b/model/request.go @@ -59,13 +59,14 @@ type RequestDetail struct { } type RequestQuery struct { - Sort *string - Target *uuid.UUID - Status *string - Since *time.Time - Until *time.Time - Limit int - Offset int - Tag *string - Group *string + Sort *string + Target *uuid.UUID + Status *string + Since *time.Time + Until *time.Time + Limit int + Offset int + Tag *string + Group *string + CreatedBy *uuid.UUID } diff --git a/router/request.go b/router/request.go index c9f3d79a..fc722b64 100644 --- a/router/request.go +++ b/router/request.go @@ -204,15 +204,16 @@ func (h Handlers) GetRequests(c echo.Context) error { cratedBy = &u } query := model.RequestQuery{ - Sort: sort, - Target: target, - Status: ss, - Since: since, - Until: until, - Limit: limit, - Offset: offset, - Tag: tag, - Group: group, + Sort: sort, + Target: target, + Status: ss, + Since: since, + Until: until, + Limit: limit, + Offset: offset, + Tag: tag, + Group: group, + CreatedBy: cratedBy, } modelrequests, err := h.Repository.GetRequests(ctx, query)