Subsonic: user management endpoints (getUser, getUsers, createUser, updateUser, deleteUser, changePassword) with full permission model mapping

This commit is contained in:
2026-08-23 00:22:44 -05:00
parent d92a25b141
commit 8d93bea384
5 changed files with 452 additions and 0 deletions
+6
View File
@@ -280,3 +280,9 @@ func nullStringVal(s sql.NullString) any {
func parseTime(s string) (time.Time, error) {
return time.Parse("2006-01-02T15:04:05.999999999Z", s)
}
// SetUserEmail updates a user's email address.
func SetUserEmail(db *sql.DB, userID, email string) error {
_, err := db.Exec(`UPDATE users SET email = ? WHERE id = ?`, email, userID)
return err
}