import { Body, Controller, Post } from '@nestjs/common';
import { SkipThrottle } from '@nestjs/throttler';
import { OpsService } from './ops.service';
import { OpsTagDto } from './dto/ops-tag.dto';

@SkipThrottle()
@Controller('ops')
export class OpsController {
    constructor(private readonly service: OpsService) {}

    @Post('sync')
    sync(@Body() dto: OpsTagDto) {
        return this.service.sync(dto.tag, dto.mode ?? 'a');
    }
}
