removed tiedot, introduced ledisdb

This commit is contained in:
Deluan
2016-02-28 00:55:36 -05:00
parent 8ffa93780d
commit c659b70cd0
7 changed files with 185 additions and 180 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ type MediaFile struct {
func NewMediaFileRepository() *MediaFile {
r := &MediaFile{}
r.col = createCollection("MediaFiles")
r.key = "mediafile"
return r
}
@@ -20,5 +20,5 @@ func (r *MediaFile) Add(m *models.MediaFile) error {
if m.Id == "" {
m.Id = fmt.Sprintf("%x", md5.Sum([]byte(m.Path)))
}
return r.saveOrUpdate(m)
return r.saveOrUpdate(m.Id, m)
}