Added announcement pages and api changes and types to fix announcements
This commit is contained in:
@@ -124,6 +124,6 @@ export async function fetchReleases(): Promise<{current_chapters:Chapter[],futur
|
||||
}
|
||||
|
||||
export async function fetchAnnouncementById(announcementId: string): Promise<Announcement> {
|
||||
const data = await fetchFromAPI<Announcement>(`/api/announcements/${announcementId}`);
|
||||
const data = await fetchFromAPI<Announcement>(`/api/announcements/${announcementId}?`);
|
||||
return data[0];
|
||||
}
|
||||
@@ -65,6 +65,7 @@ export interface Book {
|
||||
|
||||
export interface Announcement {
|
||||
id: number;
|
||||
documentId: string;
|
||||
title: string;
|
||||
content: string;
|
||||
datetime: string;
|
||||
|
||||
Reference in New Issue
Block a user