mirror of
https://github.com/immich-app/immich.git
synced 2026-04-17 14:32:02 -04:00
chore!: remove unused token response param (#27805)
This commit is contained in:
parent
6da2d3d587
commit
5f5e3344d5
@ -25,7 +25,6 @@ class SharedLinkResponseDto {
|
||||
required this.password,
|
||||
required this.showMetadata,
|
||||
required this.slug,
|
||||
this.token,
|
||||
required this.type,
|
||||
required this.userId,
|
||||
});
|
||||
@ -70,9 +69,6 @@ class SharedLinkResponseDto {
|
||||
/// Custom URL slug
|
||||
String? slug;
|
||||
|
||||
/// Access token
|
||||
String? token;
|
||||
|
||||
SharedLinkType type;
|
||||
|
||||
/// Owner user ID
|
||||
@ -92,7 +88,6 @@ class SharedLinkResponseDto {
|
||||
other.password == password &&
|
||||
other.showMetadata == showMetadata &&
|
||||
other.slug == slug &&
|
||||
other.token == token &&
|
||||
other.type == type &&
|
||||
other.userId == userId;
|
||||
|
||||
@ -111,12 +106,11 @@ class SharedLinkResponseDto {
|
||||
(password == null ? 0 : password!.hashCode) +
|
||||
(showMetadata.hashCode) +
|
||||
(slug == null ? 0 : slug!.hashCode) +
|
||||
(token == null ? 0 : token!.hashCode) +
|
||||
(type.hashCode) +
|
||||
(userId.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SharedLinkResponseDto[album=$album, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, password=$password, showMetadata=$showMetadata, slug=$slug, token=$token, type=$type, userId=$userId]';
|
||||
String toString() => 'SharedLinkResponseDto[album=$album, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, password=$password, showMetadata=$showMetadata, slug=$slug, type=$type, userId=$userId]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -155,11 +149,6 @@ class SharedLinkResponseDto {
|
||||
json[r'slug'] = this.slug;
|
||||
} else {
|
||||
// json[r'slug'] = null;
|
||||
}
|
||||
if (this.token != null) {
|
||||
json[r'token'] = this.token;
|
||||
} else {
|
||||
// json[r'token'] = null;
|
||||
}
|
||||
json[r'type'] = this.type;
|
||||
json[r'userId'] = this.userId;
|
||||
@ -187,7 +176,6 @@ class SharedLinkResponseDto {
|
||||
password: mapValueOfType<String>(json, r'password'),
|
||||
showMetadata: mapValueOfType<bool>(json, r'showMetadata')!,
|
||||
slug: mapValueOfType<String>(json, r'slug'),
|
||||
token: mapValueOfType<String>(json, r'token'),
|
||||
type: SharedLinkType.fromJson(json[r'type'])!,
|
||||
userId: mapValueOfType<String>(json, r'userId')!,
|
||||
);
|
||||
|
||||
@ -22127,27 +22127,6 @@
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"deprecated": true,
|
||||
"description": "Access token",
|
||||
"nullable": true,
|
||||
"type": "string",
|
||||
"x-immich-history": [
|
||||
{
|
||||
"version": "v1",
|
||||
"state": "Added"
|
||||
},
|
||||
{
|
||||
"version": "v2",
|
||||
"state": "Stable"
|
||||
},
|
||||
{
|
||||
"version": "v2.6.0",
|
||||
"state": "Deprecated"
|
||||
}
|
||||
],
|
||||
"x-immich-state": "Deprecated"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/components/schemas/SharedLinkType"
|
||||
},
|
||||
|
||||
@ -2235,8 +2235,6 @@ export type SharedLinkResponseDto = {
|
||||
showMetadata: boolean;
|
||||
/** Custom URL slug */
|
||||
slug: string | null;
|
||||
/** Access token */
|
||||
token?: string | null;
|
||||
"type": SharedLinkType;
|
||||
/** Owner user ID */
|
||||
userId: string;
|
||||
|
||||
@ -62,14 +62,6 @@ const SharedLinkResponseSchema = z
|
||||
id: z.string().describe('Shared link ID'),
|
||||
description: z.string().nullable().describe('Link description'),
|
||||
password: z.string().nullable().describe('Has password'),
|
||||
token: z
|
||||
.string()
|
||||
.nullish()
|
||||
.describe('Access token')
|
||||
.meta({
|
||||
...new HistoryBuilder().added('v1').stable('v2').deprecated('v2.6.0').getExtensions(),
|
||||
deprecated: true,
|
||||
}),
|
||||
userId: z.string().describe('Owner user ID'),
|
||||
key: z.string().describe('Encryption key (base64url)'),
|
||||
type: SharedLinkTypeSchema,
|
||||
|
||||
@ -6,7 +6,6 @@ export const sharedLinkFactory = Sync.makeFactory<SharedLinkResponseDto>({
|
||||
id: Sync.each(() => faker.string.uuid()),
|
||||
description: Sync.each(() => faker.word.sample()),
|
||||
password: Sync.each(() => faker.word.sample()),
|
||||
token: Sync.each(() => faker.word.sample()),
|
||||
userId: Sync.each(() => faker.string.uuid()),
|
||||
key: Sync.each(() => faker.word.sample()),
|
||||
type: Sync.each(() => faker.helpers.enumValue(SharedLinkType)),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user