feat(api): create endpoint for fetching custom sidebar items

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2023-10-10 22:37:08 -04:00
parent 152e02bb5c
commit dd97a220f5
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -0,0 +1,6 @@
import { SidebarItem } from "~/models/sidebarEntry";
export default cachedEventHandler(async (ev) => {
const si = await SidebarItem.find({});
return si.map((a) => a.toObject());
});