From 39889fe43d0ae83352cfb681669de7cd8025e574 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 9 Dec 2024 22:24:55 +0800 Subject: [PATCH] :wastebasket: Remove the useless FilterWithRealm method --- pkg/internal/services/posts.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/internal/services/posts.go b/pkg/internal/services/posts.go index 1443397..c37afe0 100644 --- a/pkg/internal/services/posts.go +++ b/pkg/internal/services/posts.go @@ -98,14 +98,6 @@ func FilterPostWithType(tx *gorm.DB, t string) *gorm.DB { return tx.Where("type = ?", t) } -func FilterPostWithRealm(tx *gorm.DB, id uint) *gorm.DB { - if id > 0 { - return tx.Where("realm_id = ?", id) - } else { - return tx.Where("realm_id IS NULL") - } -} - func FilterPostReply(tx *gorm.DB, replyTo ...uint) *gorm.DB { if len(replyTo) > 0 && replyTo[0] > 0 { return tx.Where("reply_id = ?", replyTo[0])