🗑️ Remove the useless FilterWithRealm method
This commit is contained in:
parent
8d1db481de
commit
39889fe43d
@ -98,14 +98,6 @@ func FilterPostWithType(tx *gorm.DB, t string) *gorm.DB {
|
|||||||
return tx.Where("type = ?", t)
|
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 {
|
func FilterPostReply(tx *gorm.DB, replyTo ...uint) *gorm.DB {
|
||||||
if len(replyTo) > 0 && replyTo[0] > 0 {
|
if len(replyTo) > 0 && replyTo[0] > 0 {
|
||||||
return tx.Where("reply_id = ?", replyTo[0])
|
return tx.Where("reply_id = ?", replyTo[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user