Spaces:
Runtime error
Runtime error
Download src/api/integrations/channel/evolution/evolution.router.ts from oex2003/evolution-api: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/spaces/oex2003/evolution-api/resolve/refs%2Fpr%2F1/src/api/integrations/channel/evolution/evolution.router.ts
- Command line
-
hf download hf://spaces/oex2003/evolution-api@refs/pr/1/src/api/integrations/channel/evolution/evolution.router.ts
-
curl -L -o evolution.router.ts https://huggingface.co/spaces/oex2003/evolution-api/resolve/refs%2Fpr%2F1/src/api/integrations/channel/evolution/evolution.router.ts
620 Bytes
| import { RouterBroker } from '@api/abstract/abstract.router'; | |
| import { evolutionController } from '@api/server.module'; | |
| import { ConfigService } from '@config/env.config'; | |
| import { Router } from 'express'; | |
| export class EvolutionRouter extends RouterBroker { | |
| constructor(readonly configService: ConfigService) { | |
| super(); | |
| this.router.post(this.routerPath('webhook/evolution', false), async (req, res) => { | |
| const { body } = req; | |
| const response = await evolutionController.receiveWebhook(body); | |
| return res.status(200).json(response); | |
| }); | |
| } | |
| public readonly router: Router = Router(); | |
| } | |