mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-23 07:04:22 +00:00
19 lines
780 B
TypeScript
19 lines
780 B
TypeScript
|
import { NextApiRequest, NextApiResponse } from "next";
|
||
|
import { festaAPI } from "../../../utils/api";
|
||
|
import { festaNoConfig } from "../../../utils/api/configurator";
|
||
|
import { festaBearerAuthRequired, FestaToken } from "../../../utils/api/authenticator";
|
||
|
import { festaNoBody } from "../../../utils/api/bodyValidator";
|
||
|
import { festaDebugAuth } from "../../../utils/api/executor";
|
||
|
import { festaNoQuery } from "../../../utils/api/queryValidator";
|
||
|
|
||
|
|
||
|
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||
|
await festaAPI(req, res, {
|
||
|
configurator: festaNoConfig,
|
||
|
authenticator: festaBearerAuthRequired,
|
||
|
queryValidator: festaNoQuery,
|
||
|
bodyValidator: festaNoBody,
|
||
|
executor: festaDebugAuth<FestaToken>(),
|
||
|
})
|
||
|
}
|