import { Body, Controller, Get, Param, Post, Put } from '@nestjs/common'
import { ApiTags } from '@nestjs/swagger'
import { Public } from '../auth/public.decorator'
import { SysConfigService } from './sys-config.service'
import { PageRequest } from '../common/dto/page-request'
import { SysConfig } from './entities/sys-config.entity'

@ApiTags('sys-config.admin')
@Controller('/admin/sys-config')
@Public()
export class SysConfigAdminController {
    constructor(private readonly sysConfigService: SysConfigService) {}

    @Put()
    public async create(@Body() sysConfig: Partial<SysConfig>) {
        return await this.sysConfigService.save(sysConfig)
    }
}
