diff --git a/backend/app/models/users.go b/backend/app/models/users.go index c5ce636..c09123a 100644 --- a/backend/app/models/users.go +++ b/backend/app/models/users.go @@ -213,7 +213,7 @@ func (m *usersModel) PostList(ctx context.Context, userId int64, pagination *req Cnt int64 } - stmtCnt := tblUserPosts.SELECT(COUNT(tbl.ID).AS("cnt")).WHERE(tblUserPosts.UserID.EQ(Int64(userId))) + stmtCnt := tblUserPosts.SELECT(COUNT(tblUserPosts.ID).AS("cnt")).WHERE(tblUserPosts.UserID.EQ(Int64(userId))) m.log.Infof("sql: %s", stmtCnt.DebugSql()) if err := stmtCnt.QueryContext(ctx, db, &cnt); err != nil {