diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 8b0b69625f..44eb3b8829 100644 --- a/mobile/openapi/README.md +++ b/mobile/openapi/README.md @@ -91,7 +91,7 @@ Class | Method | HTTP request | Description *AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets | *AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} | *AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} | -*AlbumApi* | [**updateAlbumUser**](doc//AlbumApi.md#updatealbumuser) | **PUT** /album/{id}/permission/{userId} | +*AlbumApi* | [**updateAlbumUser**](doc//AlbumApi.md#updatealbumuser) | **PUT** /album/{id}/user/{userId} | *AssetApi* | [**checkBulkUpload**](doc//AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check | *AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist | *AssetApi* | [**deleteAssets**](doc//AssetApi.md#deleteassets) | **DELETE** /asset | diff --git a/mobile/openapi/doc/AlbumApi.md b/mobile/openapi/doc/AlbumApi.md index 396f7514ee..2cd6cb29b0 100644 --- a/mobile/openapi/doc/AlbumApi.md +++ b/mobile/openapi/doc/AlbumApi.md @@ -19,7 +19,7 @@ Method | HTTP request | Description [**removeAssetFromAlbum**](AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets | [**removeUserFromAlbum**](AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} | [**updateAlbumInfo**](AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} | -[**updateAlbumUser**](AlbumApi.md#updatealbumuser) | **PUT** /album/{id}/permission/{userId} | +[**updateAlbumUser**](AlbumApi.md#updatealbumuser) | **PUT** /album/{id}/user/{userId} | # **addAssetsToAlbum** diff --git a/mobile/openapi/lib/api/album_api.dart b/mobile/openapi/lib/api/album_api.dart index 1e1f90ab0f..4596eff88b 100644 --- a/mobile/openapi/lib/api/album_api.dart +++ b/mobile/openapi/lib/api/album_api.dart @@ -537,7 +537,7 @@ class AlbumApi { return null; } - /// Performs an HTTP 'PUT /album/{id}/permission/{userId}' operation and returns the [Response]. + /// Performs an HTTP 'PUT /album/{id}/user/{userId}' operation and returns the [Response]. /// Parameters: /// /// * [String] id (required): @@ -547,7 +547,7 @@ class AlbumApi { /// * [UpdateAlbumUserDto] updateAlbumUserDto (required): Future updateAlbumUserWithHttpInfo(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto,) async { // ignore: prefer_const_declarations - final path = r'/album/{id}/permission/{userId}' + final path = r'/album/{id}/user/{userId}' .replaceAll('{id}', id) .replaceAll('{userId}', userId); diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index 0c56971ff3..13c9c5c15e 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -589,7 +589,48 @@ ] } }, - "/album/{id}/permission/{userId}": { + "/album/{id}/user/{userId}": { + "delete": { + "operationId": "removeUserFromAlbum", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "format": "uuid", + "type": "string" + } + }, + { + "name": "userId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ + { + "bearer": [] + }, + { + "cookie": [] + }, + { + "api_key": [] + } + ], + "tags": [ + "Album" + ] + }, "put": { "operationId": "updateAlbumUser", "parameters": [ @@ -642,49 +683,6 @@ ] } }, - "/album/{id}/user/{userId}": { - "delete": { - "operationId": "removeUserFromAlbum", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "format": "uuid", - "type": "string" - } - }, - { - "name": "userId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "bearer": [] - }, - { - "cookie": [] - }, - { - "api_key": [] - } - ], - "tags": [ - "Album" - ] - } - }, "/album/{id}/users": { "put": { "operationId": "addUsersToAlbum", diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index afd9c5ac17..a037545f53 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -1209,17 +1209,6 @@ export function addAssetsToAlbum({ id, key, bulkIdsDto }: { body: bulkIdsDto }))); } -export function updateAlbumUser({ id, userId, updateAlbumUserDto }: { - id: string; - userId: string; - updateAlbumUserDto: UpdateAlbumUserDto; -}, opts?: Oazapfts.RequestOpts) { - return oazapfts.ok(oazapfts.fetchText(`/album/${encodeURIComponent(id)}/permission/${encodeURIComponent(userId)}`, oazapfts.json({ - ...opts, - method: "PUT", - body: updateAlbumUserDto - }))); -} export function removeUserFromAlbum({ id, userId }: { id: string; userId: string; @@ -1229,6 +1218,17 @@ export function removeUserFromAlbum({ id, userId }: { method: "DELETE" })); } +export function updateAlbumUser({ id, userId, updateAlbumUserDto }: { + id: string; + userId: string; + updateAlbumUserDto: UpdateAlbumUserDto; +}, opts?: Oazapfts.RequestOpts) { + return oazapfts.ok(oazapfts.fetchText(`/album/${encodeURIComponent(id)}/user/${encodeURIComponent(userId)}`, oazapfts.json({ + ...opts, + method: "PUT", + body: updateAlbumUserDto + }))); +} export function addUsersToAlbum({ id, addUsersDto }: { id: string; addUsersDto: AddUsersDto; diff --git a/server/src/controllers/album.controller.ts b/server/src/controllers/album.controller.ts index a2946bec97..15c06304e8 100644 --- a/server/src/controllers/album.controller.ts +++ b/server/src/controllers/album.controller.ts @@ -98,7 +98,7 @@ export class AlbumController { return this.service.removeUser(auth, id, userId); } - @Put(':id/permission/:userId') + @Put(':id/user/:userId') updateAlbumUser( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto,