From 6ccd593d8888cbb37e2fbdae64e94648e040eb0d Mon Sep 17 00:00:00 2001 From: SoXX Date: Mon, 1 Jul 2024 11:36:21 +0200 Subject: [PATCH] refactor: changed code layout Signed-off-by: SoXX --- internal/postgres/user.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/postgres/user.go b/internal/postgres/user.go index c0a2543..042154f 100644 --- a/internal/postgres/user.go +++ b/internal/postgres/user.go @@ -11,6 +11,13 @@ import ( "gorm.io/gorm" ) +// Workaround, should be changed later maybe, but its not that bad right now +type selectFrequencyTag struct { + tagName string `gorm:"tag_name"` + count int64 `gorm:"count"` + tagType models.TagType `gorm:"tag_type"` +} + func CreateUser(ctx context.Context, db *gorm.DB, anthroveUserID models.AnthroveUserID) error { if anthroveUserID == "" { @@ -267,13 +274,6 @@ func GetUserFavoriteWithPagination(ctx context.Context, db *gorm.DB, anthroveUse return &models.FavoriteList{Posts: favoritePosts}, nil } -// Workaround, should be changed later maybe, but its not that bad right now -type selectFrequencyTag struct { - tagName string `gorm:"tag_name"` - count int64 `gorm:"count"` - tagType models.TagType `gorm:"tag_type"` -} - func GetUserTagWitRelationToFavedPosts(ctx context.Context, db *gorm.DB, anthroveUserID models.AnthroveUserID) ([]models.TagsWithFrequency, error) { var queryUserFavorites []selectFrequencyTag