mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Refactor download urls and client config
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
@@ -14,7 +14,7 @@ func TestGetDownload(t *testing.T) {
|
||||
|
||||
GetDownload(router, conf)
|
||||
|
||||
r := PerformRequest(app, "GET", "/api/v1/download/123xxx")
|
||||
r := PerformRequest(app, "GET", "/api/v1/dl/123xxx?t="+conf.DownloadToken())
|
||||
val := gjson.Get(r.Body.String(), "error")
|
||||
assert.Equal(t, "record not found", val.String())
|
||||
assert.Equal(t, http.StatusNotFound, r.Code)
|
||||
@@ -22,7 +22,7 @@ func TestGetDownload(t *testing.T) {
|
||||
t.Run("could not find original", func(t *testing.T) {
|
||||
app, router, conf := NewApiTest()
|
||||
GetDownload(router, conf)
|
||||
r := PerformRequest(app, "GET", "/api/v1/download/3cad9168fa6acc5c5c2965ddf6ec465ca42fd818")
|
||||
r := PerformRequest(app, "GET", "/api/v1/dl/3cad9168fa6acc5c5c2965ddf6ec465ca42fd818?t="+conf.DownloadToken())
|
||||
assert.Equal(t, http.StatusNotFound, r.Code)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user