fix: bug
This commit is contained in:
parent
f4106e156f
commit
2f99c09bfe
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ func Login(c *gin.Context) {
|
|||
}
|
||||
|
||||
var user models.User
|
||||
result := initializers.DB.First(&user, "email = ?", body.Email)
|
||||
result := initializers.DB.Preload("Posts.Files").First(&user, "email = ?", body.Email)
|
||||
|
||||
if result.Error != nil {
|
||||
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
|
||||
|
|
Loading…
Add table
Reference in a new issue