Update get User & Refresh Token

This commit is contained in:
2025-06-27 21:58:51 +07:00
parent 8873095102
commit 64b1771e2f
7 changed files with 127 additions and 10 deletions
+6
View File
@@ -23,3 +23,9 @@ func (r *UserRepository) FindByUsername(username string) (*models.User, error) {
result := r.DB.Where("username = ?", username).First(&user)
return &user, result.Error
}
func (r *UserRepository) FindByID(id uint) (*models.User, error) {
var user models.User
result := r.DB.First(&user, id)
return &user, result.Error
}