import { Controller, Post, Body, Param } from '@nestjs/common';
import { PluginService } from './plugin.service';

@Controller('plugins')
export class PluginController {
  constructor(private readonly pluginService: PluginService) {}


  @Post(':id/execute')
  async execute(
    @Param('id') pluginId: string,
    @Body() executionArgs: Record<string, any>
  ) {
    return this.pluginService.executePlugin(pluginId, executionArgs);
  }
}