update
This commit is contained in:
11
app/api.ts
11
app/api.ts
@@ -1,7 +1,16 @@
|
||||
export type DJAPIEndpoint = "/rp-articles";
|
||||
|
||||
type RPArticle = {
|
||||
title: string,
|
||||
slug: string;
|
||||
titleDe: string,
|
||||
titleEn: string,
|
||||
author: string,
|
||||
tags?: string[],
|
||||
};
|
||||
|
||||
export interface DJAPIResultMap extends Record<DJAPIEndpoint, unknown> {
|
||||
"/rp-articles": { slug: string; title: string, tags?: string[] }[];
|
||||
"/rp-articles": RPArticle[];
|
||||
}
|
||||
|
||||
export type DJAPIResult = DJAPIResultMap[DJAPIEndpoint];
|
||||
|
||||
Reference in New Issue
Block a user