mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-20 19:51:09 +10:00
feat: annotated client routes
This commit is contained in:
@ -1,9 +1,12 @@
|
||||
import { defineClientEventHandler } from "~/server/internal/clients/event-handler";
|
||||
import objectHandler from "~/server/internal/objects";
|
||||
|
||||
/**
|
||||
* Fetch object by ID
|
||||
* @param id Object ID
|
||||
*/
|
||||
export default defineClientEventHandler(async (h3, utils) => {
|
||||
const id = getRouterParam(h3, "id");
|
||||
if (!id) throw createError({ statusCode: 400, statusMessage: "Invalid ID" });
|
||||
const id = getRouterParam(h3, "id")!;
|
||||
|
||||
const user = await utils.fetchUser();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user