import { Controller, Get, Param } from '@nestjs/common';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { ExcludePrivilege, Public } from 'src/core/guards';
import { SupersetService } from './superset.service';

@ApiTags(`Superset`)
@Controller(`v1/superset`)
@Public(false)
@ApiBearerAuth('JWT')
export class SupersetController {
  constructor(private service: SupersetService) {}
  @Get('token/:id')
  @ExcludePrivilege()
  async getGuestToken(@Param('id') id: string) {
    return this.service.getGuestToken(id);
  }
}
