teableio/teable

View on GitHub
apps/nestjs-backend/src/features/setting/admin.controller.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Controller, Param, Patch } from '@nestjs/common';
import { Permissions } from '../auth/decorators/permissions.decorator';
import { AdminService } from './admin.service';

@Controller('api/admin')
@Permissions('instance|update')
export class AdminController {
  constructor(private readonly adminService: AdminService) {}

  @Patch('/plugin/:pluginId/publish')
  async publishPlugin(@Param('pluginId') pluginId: string): Promise<void> {
    await this.adminService.publishPlugin(pluginId);
  }
}