2024-06-13 21:54:14 +02:00
|
|
|
import { createAppAsyncThunk } from "app/async-thunk"
|
|
|
|
|
import { client } from "app/client"
|
|
|
|
|
import type { CollapseRequest } from "app/types"
|
|
|
|
|
|
|
|
|
|
export const reloadTree = createAppAsyncThunk("tree/reload", async () => await client.category.getRoot().then(r => r.data))
|
2025-02-14 13:49:46 +01:00
|
|
|
|
2024-06-13 21:54:14 +02:00
|
|
|
export const collapseTreeCategory = createAppAsyncThunk(
|
|
|
|
|
"tree/category/collapse",
|
|
|
|
|
async (req: CollapseRequest) => await client.category.collapse(req)
|
|
|
|
|
)
|