(err error)
| 97 | } |
| 98 | |
| 99 | func RecordExist(err error) (bool, error) { |
| 100 | if err == nil { |
| 101 | return true, nil |
| 102 | } |
| 103 | if errors.Is(err, gorm.ErrRecordNotFound) { |
| 104 | return false, nil |
| 105 | } |
| 106 | return false, err |
| 107 | } |
| 108 | |
| 109 | func shouldUpdateRedis(fromDB bool, err error) bool { |
| 110 | return common.RedisEnabled && fromDB && err == nil |
no outgoing calls
no test coverage detected