refac: stale test entries, failing web tests, Postgre backup bug, Hardcoded MySQL table count, Stale Postgre connection in test, own-scope visibility filter, GetAll ignoring its error, JSON tags in use-case types, 31 copies of DESKTOP_QUERY, ProfileView endpoint paths
This commit is contained in:
1 parent
efecdee200
commit
5d6f378fce
87 files changed
+696
-373
No files matched your search
@@ -52,16 +52,18 @@ func (u *UserRepository) Delete(id uint32) error {
|
||||
return deleteOrNotFound(result, domainUser.ErrUserNotFound)
|
||||
}
|
||||
|
||||
func (u *UserRepository) GetAll() []domainUser.User {
|
||||
func (u *UserRepository) GetAll() ([]domainUser.User, error) {
|
||||
var users []entity.User
|
||||
u.db.Model(&entity.User{}).Find(&users)
|
||||
if err := u.db.Model(&entity.User{}).Find(&users).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var domainUsers []domainUser.User
|
||||
for _, localUser := range users {
|
||||
domainUsers = append(domainUsers, mappers.UserToDomain(localUser))
|
||||
}
|
||||
|
||||
return domainUsers
|
||||
return domainUsers, nil
|
||||
}
|
||||
|
||||
func (u *UserRepository) FindByIDs(ids []uint32) ([]domainUser.User, error) {
|
||||
|
||||
Reference in new issue
Block a user