13 lines
259 B
JavaScript
13 lines
259 B
JavaScript
import { GET_TREE } from '../../sql/category.js';
|
|
|
|
export default function getTree(pool) {
|
|
return async (rootId) => {
|
|
const result = await pool
|
|
.request()
|
|
.input('rootId', rootId)
|
|
.query(GET_TREE);
|
|
|
|
return result.recordset;
|
|
};
|
|
}
|