package com.corewing.app.modules.website;

import com.corewing.app.common.Result;
import com.corewing.app.entity.AppVersion;
import com.corewing.app.service.AppVersionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 获取最新的APP版本
 */
@Api(tags = "官网APP版本")
@RestController
@RequestMapping("/api/app")
public class WebsiteAppVersionController {

    @Resource
    private AppVersionService appVersionService;

    @ApiOperation("获取最新APP版本")
    @GetMapping("/getAppVersion")
    public Result<AppVersion> getAppVersion() {
        return Result.success(appVersionService.getAppVersion());
    }


}
