Files
tessera-ctl/apps/api/src/favorites/dto/update-favorite.dto.ts
T
schalli b15c74632b fix(favorites): Symbol-Adresse auch speichern, wenn nur der Browser sie laden kann
- 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>
2026-09-29 15:34:58 +02:00

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;
}