
import api from "./index"
export const orgApi = {
  tree: () => api.get("/org/tree"),
  list: () => api.get("/org/nodes"),
  create: (data: any) => api.post("/org/nodes", data),
  update: (id: number, data: any) => api.put(`/org/nodes/${id}`, data),
  delete: (id: number) => api.delete(`/org/nodes/${id}`),
  toggle: (id: number) => api.put(`/org/nodes/${id}/toggle`),
}
