mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 12:59:06 +01:00
:fix delete user logging
This commit is contained in:
parent
b7aacd1b33
commit
81d9015d59
@ -134,8 +134,12 @@ func (r *UserRepository) AddUser(user *schema.User) error {
|
|||||||
func (r *UserRepository) DelUser(username string) error {
|
func (r *UserRepository) DelUser(username string) error {
|
||||||
|
|
||||||
_, err := r.DB.Exec(`DELETE FROM user WHERE user.username = ?`, username)
|
_, err := r.DB.Exec(`DELETE FROM user WHERE user.username = ?`, username)
|
||||||
log.Errorf("Error while deleting user '%s' from DB", username)
|
if err != nil {
|
||||||
return err
|
log.Errorf("Error while deleting user '%s' from DB", username)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
log.Infof("deleted user '%s' from DB", username)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *UserRepository) ListUsers(specialsOnly bool) ([]*schema.User, error) {
|
func (r *UserRepository) ListUsers(specialsOnly bool) ([]*schema.User, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user