mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
chore: remove unused upload property (#7535)
* chore: remove isExternal * chore: open-api
This commit is contained in:
parent
3d25d91e77
commit
15a4a4aaaa
7 changed files with 9 additions and 27 deletions
BIN
mobile/openapi/doc/AssetApi.md
generated
BIN
mobile/openapi/doc/AssetApi.md
generated
Binary file not shown.
BIN
mobile/openapi/lib/api/asset_api.dart
generated
BIN
mobile/openapi/lib/api/asset_api.dart
generated
Binary file not shown.
BIN
mobile/openapi/test/asset_api_test.dart
generated
BIN
mobile/openapi/test/asset_api_test.dart
generated
Binary file not shown.
|
|
@ -7541,9 +7541,6 @@
|
||||||
"isArchived": {
|
"isArchived": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"isExternal": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"isFavorite": {
|
"isFavorite": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,6 @@ export type CreateAssetDto = {
|
||||||
fileCreatedAt: string;
|
fileCreatedAt: string;
|
||||||
fileModifiedAt: string;
|
fileModifiedAt: string;
|
||||||
isArchived?: boolean;
|
isArchived?: boolean;
|
||||||
isExternal?: boolean;
|
|
||||||
isFavorite?: boolean;
|
isFavorite?: boolean;
|
||||||
isOffline?: boolean;
|
isOffline?: boolean;
|
||||||
isReadOnly?: boolean;
|
isReadOnly?: boolean;
|
||||||
|
|
|
||||||
|
|
@ -341,7 +341,6 @@ export class AssetService {
|
||||||
fileCreatedAt: dto.fileCreatedAt,
|
fileCreatedAt: dto.fileCreatedAt,
|
||||||
fileModifiedAt: dto.fileModifiedAt,
|
fileModifiedAt: dto.fileModifiedAt,
|
||||||
localDateTime: dto.fileCreatedAt,
|
localDateTime: dto.fileCreatedAt,
|
||||||
deletedAt: null,
|
|
||||||
|
|
||||||
type: mimeTypes.assetType(file.originalPath),
|
type: mimeTypes.assetType(file.originalPath),
|
||||||
isFavorite: dto.isFavorite,
|
isFavorite: dto.isFavorite,
|
||||||
|
|
@ -349,17 +348,9 @@ export class AssetService {
|
||||||
duration: dto.duration || null,
|
duration: dto.duration || null,
|
||||||
isVisible: dto.isVisible ?? true,
|
isVisible: dto.isVisible ?? true,
|
||||||
livePhotoVideo: livePhotoAssetId === null ? null : ({ id: livePhotoAssetId } as AssetEntity),
|
livePhotoVideo: livePhotoAssetId === null ? null : ({ id: livePhotoAssetId } as AssetEntity),
|
||||||
resizePath: null,
|
|
||||||
webpPath: null,
|
|
||||||
thumbhash: null,
|
|
||||||
encodedVideoPath: null,
|
|
||||||
tags: [],
|
|
||||||
sharedLinks: [],
|
|
||||||
originalFileName: parse(file.originalName).name,
|
originalFileName: parse(file.originalName).name,
|
||||||
faces: [],
|
|
||||||
sidecarPath: sidecarPath || null,
|
sidecarPath: sidecarPath || null,
|
||||||
isReadOnly: dto.isReadOnly ?? false,
|
isReadOnly: dto.isReadOnly ?? false,
|
||||||
isExternal: dto.isExternal ?? false,
|
|
||||||
isOffline: dto.isOffline ?? false,
|
isOffline: dto.isOffline ?? false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@ import { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Transform, Type } from 'class-transformer';
|
import { Transform, Type } from 'class-transformer';
|
||||||
import { IsBoolean, IsDate, IsNotEmpty, IsString } from 'class-validator';
|
import { IsBoolean, IsDate, IsNotEmpty, IsString } from 'class-validator';
|
||||||
|
|
||||||
export class CreateAssetBase {
|
export class CreateAssetDto {
|
||||||
|
@ValidateUUID({ optional: true })
|
||||||
|
libraryId?: string;
|
||||||
|
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsString()
|
@IsString()
|
||||||
deviceAssetId!: string;
|
deviceAssetId!: string;
|
||||||
|
|
@ -22,6 +25,10 @@ export class CreateAssetBase {
|
||||||
@Type(() => Date)
|
@Type(() => Date)
|
||||||
fileModifiedAt!: Date;
|
fileModifiedAt!: Date;
|
||||||
|
|
||||||
|
@Optional()
|
||||||
|
@IsString()
|
||||||
|
duration?: string;
|
||||||
|
|
||||||
@Optional()
|
@Optional()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
@Transform(toBoolean)
|
@Transform(toBoolean)
|
||||||
|
|
@ -37,28 +44,16 @@ export class CreateAssetBase {
|
||||||
@Transform(toBoolean)
|
@Transform(toBoolean)
|
||||||
isVisible?: boolean;
|
isVisible?: boolean;
|
||||||
|
|
||||||
@Optional()
|
|
||||||
@IsString()
|
|
||||||
duration?: string;
|
|
||||||
|
|
||||||
@Optional()
|
|
||||||
@IsBoolean()
|
|
||||||
isExternal?: boolean;
|
|
||||||
|
|
||||||
@Optional()
|
@Optional()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
|
@Transform(toBoolean)
|
||||||
isOffline?: boolean;
|
isOffline?: boolean;
|
||||||
}
|
|
||||||
|
|
||||||
export class CreateAssetDto extends CreateAssetBase {
|
|
||||||
@Optional()
|
@Optional()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
@Transform(toBoolean)
|
@Transform(toBoolean)
|
||||||
isReadOnly?: boolean;
|
isReadOnly?: boolean;
|
||||||
|
|
||||||
@ValidateUUID({ optional: true })
|
|
||||||
libraryId?: string;
|
|
||||||
|
|
||||||
// The properties below are added to correctly generate the API docs
|
// The properties below are added to correctly generate the API docs
|
||||||
// and client SDKs. Validation should be handled in the controller.
|
// and client SDKs. Validation should be handled in the controller.
|
||||||
@ApiProperty({ type: 'string', format: 'binary' })
|
@ApiProperty({ type: 'string', format: 'binary' })
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue