2023-12-20 17:23:31 -05:00
|
|
|
import { SidebarItem } from "@models/sidebarEntry";
|
2023-10-10 22:37:08 -04:00
|
|
|
|
2024-03-16 20:58:39 -04:00
|
|
|
export default cachedEventHandler(
|
|
|
|
async (ev) => {
|
|
|
|
const si = await SidebarItem.find({});
|
|
|
|
return si.map((a) => a.toObject());
|
|
|
|
},
|
|
|
|
{
|
|
|
|
getKey(event) {
|
|
|
|
return "sidebar";
|
|
|
|
},
|
|
|
|
maxAge: 60 * 10,
|
|
|
|
},
|
|
|
|
);
|