feat: add password management, reading persistence on feed switch, and spin animation
This commit is contained in:
@@ -173,6 +173,15 @@ func (d *DB) CreateUser(username, passwordHash string) (*models.User, error) {
|
||||
return u, nil
|
||||
}
|
||||
|
||||
func (d *DB) UpdateUserPassword(userID, passwordHash string) error {
|
||||
now := time.Now().UTC()
|
||||
_, err := d.Exec(
|
||||
"UPDATE users SET password_hash = ?, updated_at = ? WHERE id = ?",
|
||||
passwordHash, now, userID,
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
// Category operations
|
||||
func (d *DB) ListCategories() ([]models.Category, error) {
|
||||
query := `
|
||||
|
||||
Reference in New Issue
Block a user