Feat/restructure api (#6664)

* Restructured rest api

* Added swagger ui

* Added reworked rest api

* Reformatted code, excluded unnecessary newlines and removed version 2.2.2
This commit is contained in:
SamTV12345 2024-09-21 13:00:39 +02:00 committed by GitHub
parent 76e52e51d9
commit 12f81cfb5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1588 additions and 16 deletions

View file

@ -153,7 +153,7 @@ export const expressCreateServer = async (hookName: string, args: ArgsExpressTyp
});
args.app.post('/interaction/:uid', async (req: Http2ServerRequest, res: Http2ServerResponse, next:Function) => {
args.app.post('/interaction/:uid', async (req, res, next) => {
const formid = new IncomingForm();
try {
// @ts-ignore
@ -226,7 +226,7 @@ export const expressCreateServer = async (hookName: string, args: ArgsExpressTyp
})
args.app.get('/interaction/:uid', async (req: Request, res: Response, next: Function) => {
args.app.get('/interaction/:uid', async (req, res, next) => {
try {
const {
uid, prompt, params, session,