package com.ningdatech.carapi.log.controller;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ningdatech.carapi.log.manage.LogManage;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 用户登录获取验证码
 *
 * @author CMM
 * @since 2023/01/06 16:38
 */
@Slf4j
@Validated
@RestController
@RequestMapping("/open/api/log")
@Api(value = "LogBackupController", tags = "日志备份下载")
@RequiredArgsConstructor
public class LogBackupController {

    private final LogManage logManage;

    @ApiOperation(value = "log backup", notes = "log backup")
    @GetMapping("/backup")
    public String backupLog() {
        return logManage.backupLog();
    }
}
