Storm AlbumRepository complete.

This commit is contained in:
Deluan
2020-01-10 17:58:08 -05:00
committed by Deluan Quintão
parent 0ca691b37f
commit c608e917db
10 changed files with 267 additions and 13 deletions
+4 -1
View File
@@ -22,12 +22,15 @@ func (r *propertyRepository) Put(id string, value string) error {
func (r *propertyRepository) Get(id string) (string, error) {
var value string
err := Db().Get(propertyBucket, id, &value)
if err == storm.ErrNotFound {
return value, domain.ErrNotFound
}
return value, err
}
func (r *propertyRepository) DefaultGet(id string, defaultValue string) (string, error) {
value, err := r.Get(id)
if err == storm.ErrNotFound {
if err == domain.ErrNotFound {
return defaultValue, nil
}
if err != nil {