Files
diachron/express/handlers.ts
2025-11-17 10:58:54 -06:00

20 lines
533 B
TypeScript

import { contentTypes } from "./content-types";
import { httpCodes } from "./http-codes";
import { services } from "./services";
import { Call, Handler, Result } from "./types";
const multiHandler: Handler = async (call: Call): Promise<Result> => {
const code = httpCodes.success.OK;
const rn = services.random.randomNumber();
const retval: Result = {
code,
result: `that was ${call.method} (${rn})`,
contentType: contentTypes.text.plain,
};
return retval;
};
export { multiHandler };