adding chat features, admin features and bug fixes

This commit is contained in:
Matthias Hochmeister
2026-03-12 08:16:34 +01:00
parent 7b14e3d5ba
commit 31f1414e06
43 changed files with 2610 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
import { api } from './api';
import type { BookStackRecentResponse, BookStackSearchResponse } from '../types/bookstack.types';
import type { BookStackRecentResponse, BookStackSearchResponse, BookStackPageDetail } from '../types/bookstack.types';
interface ApiResponse<T> {
success: boolean;
@@ -14,6 +14,12 @@ export const bookstackApi = {
.then((r) => ({ configured: r.data.configured, data: r.data.data }));
},
getPage(id: number): Promise<{ configured: boolean; data: BookStackPageDetail | null }> {
return api
.get<ApiResponse<BookStackPageDetail | null>>(`/api/bookstack/pages/${id}`)
.then((r) => ({ configured: r.data.configured, data: r.data.data }));
},
search(query: string): Promise<BookStackSearchResponse> {
return api
.get<ApiResponse<BookStackSearchResponse['data']>>('/api/bookstack/search', {