mirror of
https://github.com/versia-pub/server.git
synced 2025-12-07 00:48:18 +01:00
17 lines
326 B
TypeScript
17 lines
326 B
TypeScript
import { z } from "zod";
|
|
import { Hooks } from "./hooks.ts";
|
|
import { Plugin } from "./plugin.ts";
|
|
|
|
const myPlugin = new Plugin(
|
|
z.object({
|
|
apiKey: z.string(),
|
|
}),
|
|
);
|
|
|
|
myPlugin.registerHandler(Hooks.Response, (req) => {
|
|
console.info("Request received:", req);
|
|
return req;
|
|
});
|
|
|
|
export default myPlugin;
|