mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
API: Update endpoints to return HTTP 201 when a new resource was created
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -97,7 +97,7 @@ func TestBatchAlbumsDelete(t *testing.T) {
|
||||
app, router, _ := NewApiTest()
|
||||
CreateAlbum(router)
|
||||
r := PerformRequestWithBody(app, "POST", "/api/v1/albums", `{"Title": "BatchDelete", "Description": "To be deleted", "Notes": "", "Favorite": true}`)
|
||||
assert.Equal(t, http.StatusOK, r.Code)
|
||||
assert.Equal(t, http.StatusCreated, r.Code)
|
||||
uid := gjson.Get(r.Body.String(), "UID").String()
|
||||
|
||||
t.Run("Success", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user