mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
feat(ui): add addExtraTarget/removeExtraTarget API client methods
This commit is contained in:
@@ -559,6 +559,16 @@ export const api = {
|
||||
...(extension !== undefined && { extension }),
|
||||
}),
|
||||
}),
|
||||
addExtraTarget: (name: string, target: { path: string; mode?: string; flatten?: boolean }) =>
|
||||
apiFetch<{ success: boolean }>(`/extras/${encodeURIComponent(name)}/targets`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(target),
|
||||
}),
|
||||
removeExtraTarget: (name: string, path: string) =>
|
||||
apiFetch<{ success: boolean }>(`/extras/${encodeURIComponent(name)}/targets`, {
|
||||
method: 'DELETE',
|
||||
body: JSON.stringify({ path }),
|
||||
}),
|
||||
|
||||
// Log
|
||||
listLog: (type?: string, limit?: number, filters?: { cmd?: string; status?: string; since?: string }) => {
|
||||
|
||||
Reference in New Issue
Block a user