mediaapi/storage: StoreMediaMetadata error if origin and id not unique in db

This commit is contained in:
Robert Swain 2017-05-22 15:11:28 +02:00
parent 2004dfcfcf
commit 2f6db5d317

View file

@ -43,6 +43,7 @@ func Open(dataSourceName string) (*Database, error) {
}
// StoreMediaMetadata inserts the metadata about the uploaded media into the database.
// Returns an error if the combination of MediaID and Origin are not unique in the table.
func (d *Database) StoreMediaMetadata(mediaMetadata *types.MediaMetadata) error {
return d.statements.insertMedia(mediaMetadata)
}