HEAVY: finish music service migration, tidy up services, more tests

This commit is contained in:
ari melody 2026-08-01 00:29:31 +01:00
parent 9e311df462
commit 90a671982c
Signed by: ari
GPG key ID: CF99829C92678188
47 changed files with 2698 additions and 902 deletions

View file

@ -157,11 +157,6 @@ func (repo *AccountRepositoryPostgres) RemoveAvatar(id string) error {
return err
}
func (repo *AccountRepositoryPostgres) Delete(id string) error {
_, err := repo.db.Exec("DELETE FROM account WHERE id=$1", id)
return err
}
// Increment the number of account login failure attempts,
// returning the current fail count.
func (repo *AccountRepositoryPostgres) IncrementFails(id string) (int, error) {
@ -179,3 +174,9 @@ func (repo *AccountRepositoryPostgres) SetLocked(id string, locked bool) error {
_, err := repo.db.Exec("UPDATE account SET locked = $2 WHERE id=$1", id, locked)
return err
}
func (repo *AccountRepositoryPostgres) Delete(id string) (string, error) {
var deletedID string
err := repo.db.Get(&deletedID, "DELETE FROM account WHERE id=$1", id)
return deletedID, err
}