feat(api): create endpoint for fetching custom sidebar items
This commit is contained in:
parent
152e02bb5c
commit
dd97a220f5
6
server/api/sidebar/index.get.ts
Normal file
6
server/api/sidebar/index.get.ts
Normal 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());
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user