Add link support to resource creation and editing, including validation

This commit is contained in:
2025-06-24 20:19:29 +08:00
parent 167cb617b8
commit c44d71b0da
8 changed files with 185 additions and 17 deletions

View File

@@ -42,6 +42,7 @@ export interface TagWithCount extends Tag {
export interface CreateResourceParams {
title: string;
alternative_titles: string[];
links: RLink[];
tags: number[];
article: string;
images: number[];
@@ -53,6 +54,11 @@ export interface Image {
height: number;
}
export interface RLink {
label: string;
url: string;
}
export interface Resource {
id: number;
title: string;
@@ -66,6 +72,7 @@ export interface ResourceDetails {
id: number;
title: string;
alternativeTitles: string[];
links: RLink[];
article: string;
createdAt: string;
tags: Tag[];