b15c74632b
- API: ausdrueckliche iconUrl wird nur auf Form (http/https, <= 2048) geprueft und auch gespeichert, wenn der Server sie nicht abrufen kann; keine 422 mehr - Erkennung: Seite mit Fehlerstatus, aber HTML mit <link rel=icon>, liefert diesen Verweis (docuvita); og:image einer Fehlerseite zaehlt nicht - Kachel: Proxy -> iconUrl direkt im Browser (no-referrer, nur http/https) -> Origin-Favicon -> Buchstabe - Meldung iconUrlUnreachable (de/en) entfernt, Hinweis zum Vorrang angepasst Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
30 lines
676 B
TypeScript
30 lines
676 B
TypeScript
import { IsInt, IsOptional, IsString, IsUrl, MaxLength } from 'class-validator';
|
|
|
|
/**
|
|
* DTO for updating an existing FavoriteLink.
|
|
* All fields are optional — only provided fields are updated.
|
|
* iconUrl accepts null explicitly to clear a stored icon.
|
|
*/
|
|
export class UpdateFavoriteDto {
|
|
@IsOptional()
|
|
@IsString()
|
|
title?: string;
|
|
|
|
@IsOptional()
|
|
@IsUrl()
|
|
url?: string;
|
|
|
|
/**
|
|
* iconUrl can be a string (updated URL), null (clear icon), or absent (no change).
|
|
* No strict type validation so null passes through to Prisma.
|
|
*/
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(2048)
|
|
iconUrl?: string | null;
|
|
|
|
@IsOptional()
|
|
@IsInt()
|
|
position?: number;
|
|
}
|