mirror of
https://github.com/immich-app/immich.git
synced 2025-04-08 03:01:32 -05:00
Fixed upsert new DeviceInfo with null isAutoBackup property
This commit is contained in:
parent
f096910abc
commit
09103dc981
9 changed files with 9 additions and 27 deletions
2
mobile/openapi/README.md
generated
2
mobile/openapi/README.md
generated
|
@ -3,7 +3,7 @@ Immich API
|
|||
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.17.0
|
||||
- API version: 1.38.0
|
||||
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
|
8
mobile/openapi/lib/api/device_info_api.dart
generated
8
mobile/openapi/lib/api/device_info_api.dart
generated
|
@ -16,8 +16,6 @@ class DeviceInfoApi {
|
|||
|
||||
final ApiClient apiClient;
|
||||
|
||||
///
|
||||
///
|
||||
/// @deprecated
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
|
@ -50,8 +48,6 @@ class DeviceInfoApi {
|
|||
);
|
||||
}
|
||||
|
||||
///
|
||||
///
|
||||
/// @deprecated
|
||||
///
|
||||
/// Parameters:
|
||||
|
@ -72,8 +68,6 @@ class DeviceInfoApi {
|
|||
return null;
|
||||
}
|
||||
|
||||
///
|
||||
///
|
||||
/// @deprecated
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
|
@ -106,8 +100,6 @@ class DeviceInfoApi {
|
|||
);
|
||||
}
|
||||
|
||||
///
|
||||
///
|
||||
/// @deprecated
|
||||
///
|
||||
/// Parameters:
|
||||
|
|
4
mobile/openapi/test/device_info_api_test.dart
generated
4
mobile/openapi/test/device_info_api_test.dart
generated
|
@ -17,8 +17,6 @@ void main() {
|
|||
// final instance = DeviceInfoApi();
|
||||
|
||||
group('tests for DeviceInfoApi', () {
|
||||
//
|
||||
//
|
||||
// @deprecated
|
||||
//
|
||||
//Future<DeviceInfoResponseDto> createDeviceInfo(UpsertDeviceInfoDto upsertDeviceInfoDto) async
|
||||
|
@ -26,8 +24,6 @@ void main() {
|
|||
// TODO
|
||||
});
|
||||
|
||||
//
|
||||
//
|
||||
// @deprecated
|
||||
//
|
||||
//Future<DeviceInfoResponseDto> updateDeviceInfo(UpsertDeviceInfoDto upsertDeviceInfoDto) async
|
||||
|
|
|
@ -18,12 +18,14 @@ export class DeviceInfoService {
|
|||
const exists = await this.repository.findOne({ where: { userId, deviceId } });
|
||||
|
||||
if (!exists) {
|
||||
if (!entity.isAutoBackup) {
|
||||
entity.isAutoBackup = false;
|
||||
}
|
||||
return await this.repository.save(entity);
|
||||
}
|
||||
|
||||
exists.isAutoBackup = entity.isAutoBackup ?? exists.isAutoBackup;
|
||||
exists.deviceType = entity.deviceType ?? exists.deviceType;
|
||||
|
||||
return await this.repository.save(exists);
|
||||
}
|
||||
}
|
||||
|
|
10
web/src/api/open-api/api.ts
generated
10
web/src/api/open-api/api.ts
generated
|
@ -4,7 +4,7 @@
|
|||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.17.0
|
||||
* The version of the OpenAPI document: 1.38.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
@ -4341,7 +4341,6 @@ export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configur
|
|||
return {
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
@ -4381,7 +4380,6 @@ export const DeviceInfoApiAxiosParamCreator = function (configuration?: Configur
|
|||
},
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
@ -4470,7 +4468,6 @@ export const DeviceInfoApiFp = function(configuration?: Configuration) {
|
|||
return {
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
@ -4481,7 +4478,6 @@ export const DeviceInfoApiFp = function(configuration?: Configuration) {
|
|||
},
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
@ -4512,7 +4508,6 @@ export const DeviceInfoApiFactory = function (configuration?: Configuration, bas
|
|||
return {
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
@ -4522,7 +4517,6 @@ export const DeviceInfoApiFactory = function (configuration?: Configuration, bas
|
|||
},
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
@ -4551,7 +4545,6 @@ export const DeviceInfoApiFactory = function (configuration?: Configuration, bas
|
|||
export class DeviceInfoApi extends BaseAPI {
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
@ -4563,7 +4556,6 @@ export class DeviceInfoApi extends BaseAPI {
|
|||
|
||||
/**
|
||||
* @deprecated
|
||||
* @summary
|
||||
* @param {UpsertDeviceInfoDto} upsertDeviceInfoDto
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
|
2
web/src/api/open-api/base.ts
generated
2
web/src/api/open-api/base.ts
generated
|
@ -4,7 +4,7 @@
|
|||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.17.0
|
||||
* The version of the OpenAPI document: 1.38.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
2
web/src/api/open-api/common.ts
generated
2
web/src/api/open-api/common.ts
generated
|
@ -4,7 +4,7 @@
|
|||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.17.0
|
||||
* The version of the OpenAPI document: 1.38.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
2
web/src/api/open-api/configuration.ts
generated
2
web/src/api/open-api/configuration.ts
generated
|
@ -4,7 +4,7 @@
|
|||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.17.0
|
||||
* The version of the OpenAPI document: 1.38.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
2
web/src/api/open-api/index.ts
generated
2
web/src/api/open-api/index.ts
generated
|
@ -4,7 +4,7 @@
|
|||
* Immich
|
||||
* Immich API
|
||||
*
|
||||
* The version of the OpenAPI document: 1.17.0
|
||||
* The version of the OpenAPI document: 1.38.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
Loading…
Add table
Reference in a new issue