Work on getting notes API
This commit is contained in:
parent
f656757710
commit
8a4c19dd17
9 changed files with 153 additions and 11 deletions
|
@ -168,8 +168,8 @@ func (s *Storage) FindAccountById(id string) (*Account, error) {
|
|||
}
|
||||
|
||||
log.Debug().Str("account-id", id).Msg("Didn't hit account in cache, checking db")
|
||||
acc = &Account{ID: id}
|
||||
res := s.db.First(acc)
|
||||
acc = &Account{}
|
||||
res := s.db.Where(Account{ID: id}).First(acc)
|
||||
if res.Error != nil {
|
||||
if errors.Is(res.Error, gorm.ErrRecordNotFound) {
|
||||
log.Warn().Str("account-id", id).Msg("Account not found")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue