Backend: Add account API #225

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer
2020-03-28 15:29:17 +01:00
parent 81dc7bbb19
commit 1d667ada79
38 changed files with 471 additions and 146 deletions

View File

@@ -23,8 +23,8 @@ func GetDownload(router *gin.RouterGroup, conf *config.Config) {
router.GET("/download/:hash", func(c *gin.Context) {
fileHash := c.Param("hash")
q := query.New(conf.OriginalsPath(), conf.Db())
f, err := q.FindFileByHash(fileHash)
q := query.New(conf.Db())
f, err := q.FileByHash(fileHash)
if err != nil {
c.AbortWithStatusJSON(404, gin.H{"error": err.Error()})