mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Backend: Rename repo package to query
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"path"
|
||||
|
||||
"github.com/photoprism/photoprism/internal/config"
|
||||
"github.com/photoprism/photoprism/internal/repo"
|
||||
"github.com/photoprism/photoprism/internal/query"
|
||||
"github.com/photoprism/photoprism/internal/util"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -23,8 +23,8 @@ func GetDownload(router *gin.RouterGroup, conf *config.Config) {
|
||||
router.GET("/download/:hash", func(c *gin.Context) {
|
||||
fileHash := c.Param("hash")
|
||||
|
||||
r := repo.New(conf.OriginalsPath(), conf.Db())
|
||||
file, err := r.FindFileByHash(fileHash)
|
||||
q := query.New(conf.OriginalsPath(), conf.Db())
|
||||
file, err := q.FindFileByHash(fileHash)
|
||||
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(404, gin.H{"error": err.Error()})
|
||||
|
||||
Reference in New Issue
Block a user