fix(web/server) uploaded asset in shared link not loaded (#1766)

* fix(web/server): Uploaded asset to shared link does not get added to the shared link/album

* remove unused code

* Add endpoints for each remove and add assets to shared link

* Update api

* Added deletion logic

* Convert callback to async/await

* Fix linter

* Fix test

* Fix server test

* added test

* Test coverage

* modify DTO

* Add notification

* fix test
This commit is contained in:
Alex
2023-02-15 15:21:22 -06:00
committed by GitHub
parent 125ec1e85f
commit b660240059
25 changed files with 583 additions and 526 deletions

View File

@@ -1869,9 +1869,11 @@
"bearer": []
}
]
},
}
},
"/asset/shared-link/add": {
"patch": {
"operationId": "updateAssetsInSharedLink",
"operationId": "addAssetsToSharedLink",
"description": "",
"parameters": [],
"requestBody": {
@@ -1879,7 +1881,44 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateAssetsToSharedLinkDto"
"$ref": "#/components/schemas/AddAssetsDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SharedLinkResponseDto"
}
}
}
}
},
"tags": [
"Asset"
],
"security": [
{
"bearer": []
}
]
}
},
"/asset/shared-link/remove": {
"patch": {
"operationId": "removeAssetsFromSharedLink",
"description": "",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RemoveAssetsDto"
}
}
}
@@ -4171,7 +4210,21 @@
"assetIds"
]
},
"UpdateAssetsToSharedLinkDto": {
"AddAssetsDto": {
"type": "object",
"properties": {
"assetIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"assetIds"
]
},
"RemoveAssetsDto": {
"type": "object",
"properties": {
"assetIds": {
@@ -4267,20 +4320,6 @@
"sharedUserIds"
]
},
"AddAssetsDto": {
"type": "object",
"properties": {
"assetIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"assetIds"
]
},
"AddAssetsResponseDto": {
"type": "object",
"properties": {
@@ -4302,20 +4341,6 @@
"alreadyInAlbum"
]
},
"RemoveAssetsDto": {
"type": "object",
"properties": {
"assetIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"assetIds"
]
},
"UpdateAlbumDto": {
"type": "object",
"properties": {