From afc362d047457daa008309d2dbf2470e5c0b15aa Mon Sep 17 00:00:00 2001 From: zouap Date: Sat, 14 Jan 2023 10:01:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/user_data_analysis.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index 07e87f7cc..8121f167c 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -922,10 +922,6 @@ func QueryUserLoginInfo(ctx *context.Context) { func QueryUserAnnualReport(ctx *context.Context) { log.Info("start to QueryUserAnnualReport ") - if ctx.User == nil { - ctx.JSON(http.StatusOK, nil) - } else { - result := models.QueryUserAnnualReport(ctx.User.ID) - ctx.JSON(http.StatusOK, result) - } + result := models.QueryUserAnnualReport(ctx.User.ID) + ctx.JSON(http.StatusOK, result) }