🐛 Fix cannot get post by alias

This commit is contained in:
LittleSheep 2024-12-20 23:56:56 +08:00
parent c31d390a0b
commit 0ceee18524

View File

@ -220,7 +220,7 @@ func GetPostByAlias(tx *gorm.DB, alias, area string, ignoreLimitation ...bool) (
var item models.Post
if err := PreloadGeneral(tx).
Where("alias = ?", alias).
Where("area_alias = ?", area).
Where("alias_prefix = ?", area).
First(&item).Error; err != nil {
return item, err
}