mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-29 03:26:37 +08:00
261d342fa1
- AIAssistantPage (/ai): smart natural-language search showing parsed intent + matching media grid, plus history-based recommendations. - StrmPage (/strm, admin): import streaming-only entries from URLs and attach/detach STRM URL on existing media. - ToolsPage (/tools, admin): organize an entire library or single media item, send test notifications through configured channels. - Wire new routes in App.tsx and add sidebar links in Layout.tsx. Co-authored-by: Shuke <272197458+ShukeBta@users.noreply.github.com>
22 lines
727 B
TypeScript
22 lines
727 B
TypeScript
import { api } from './client'
|
|
|
|
// toolsAPI groups admin-only endpoints that don't fit the other domain
|
|
// modules: organizing media files into the canonical naming layout, and
|
|
// dispatching a test notification through the configured channels.
|
|
export const toolsAPI = {
|
|
organizeMedia: (mediaID: string) =>
|
|
api
|
|
.post<{ path: string }>(`/admin/media/${mediaID}/organize`)
|
|
.then((r) => r.data),
|
|
|
|
organizeLibrary: (libraryID: string) =>
|
|
api
|
|
.post<Record<string, unknown>>(`/admin/libraries/${libraryID}/organize`)
|
|
.then((r) => r.data),
|
|
|
|
notifyTest: (title: string, body: string) =>
|
|
api
|
|
.post<{ message: string }>('/admin/notify/test', { title, body })
|
|
.then((r) => r.data),
|
|
}
|