big style update
This commit is contained in:
14
app/api.ts
14
app/api.ts
@@ -1,4 +1,15 @@
|
||||
export type DjAPIEndpoint = "/rp-articles";
|
||||
export type DjAPIEndpoint =
|
||||
| "/rp-articles"
|
||||
| "/blog-entries"
|
||||
;
|
||||
|
||||
type BlogEntry = {
|
||||
title: string,
|
||||
slug: string;
|
||||
createdAt: string,
|
||||
updatedAt: string,
|
||||
tags?: string[],
|
||||
};
|
||||
|
||||
type RPArticle = {
|
||||
title: string,
|
||||
@@ -11,6 +22,7 @@ type RPArticle = {
|
||||
|
||||
export interface DjAPIResultMap extends Record<DjAPIEndpoint, unknown> {
|
||||
"/rp-articles": RPArticle[];
|
||||
"/blog-entries": BlogEntry[];
|
||||
}
|
||||
|
||||
export type DjAPIResult = DjAPIResultMap[DjAPIEndpoint];
|
||||
|
||||
Reference in New Issue
Block a user