photoprism/internal/query/markers.go
2021-06-02 17:25:04 +02:00

15 lines
317 B
Go

package query
import (
"github.com/photoprism/photoprism/internal/entity"
)
// MarkerByID returns a Marker based on the ID.
func MarkerByID(id uint) (marker entity.Marker, err error) {
if err := UnscopedDb().Where("id = ?", id).
First(&marker).Error; err != nil {
return marker, err
}
return marker, nil
}