diff --git a/src/modules/snippet/snippet.controller.ts b/src/modules/snippet/snippet.controller.ts index 4046b180..25eedd35 100644 --- a/src/modules/snippet/snippet.controller.ts +++ b/src/modules/snippet/snippet.controller.ts @@ -59,6 +59,12 @@ export class SnippetController { return snippet } + @Post('/aggregate') + @Auth() + async aggregate(@Body() body: any) { + return this.snippetService.model.aggregate(body) + } + @Get('/:reference/:name') @HTTPDecorators.Bypass @HttpCache({ ttl: 3 }) @@ -86,7 +92,7 @@ export class SnippetController { if (snippet.type === SnippetType.Function) { throw new BadRequestException( - 'this snippet should run in serverless function scope.', + 'this snippet should run in serverless function scope', ) } }