12 lines
563 B
TypeScript
12 lines
563 B
TypeScript
export const getLogDates = (name: string): Promise<string[]> =>
|
|
fetch(`/api/apps/${name}/logs/dates`).then(r => r.json())
|
|
|
|
export const getLogsForDate = (name: string, date: string): Promise<string[]> =>
|
|
fetch(`/api/apps/${name}/logs?date=${date}`).then(r => r.json())
|
|
|
|
export const restartApp = (name: string) => fetch(`/api/apps/${name}/restart`, { method: 'POST' })
|
|
|
|
export const startApp = (name: string) => fetch(`/api/apps/${name}/start`, { method: 'POST' })
|
|
|
|
export const stopApp = (name: string) => fetch(`/api/apps/${name}/stop`, { method: 'POST' })
|