40 lines
872 B
C#
40 lines
872 B
C#
using AutoMapper;
|
|
using ChessGameDomain;
|
|
using Common;
|
|
using CommonDomain;
|
|
using CommonDomain.BaseModel;
|
|
using CommonDomain.Enum;
|
|
using CommonInfrastructure;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using RedisService;
|
|
using UserService.GameConfigs;
|
|
|
|
namespace UserApi.GameConfigs
|
|
{
|
|
[ApiController, Route("api/[controller]")]
|
|
|
|
public class GameConfigController : BaseController
|
|
{
|
|
private readonly IGameConfigService _gameConfigService;
|
|
|
|
|
|
public GameConfigController(IGameConfigService gameConfigService)
|
|
{
|
|
_gameConfigService = gameConfigService;
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 获取游戏配置
|
|
/// </summary>
|
|
[HttpGet]
|
|
|
|
public async Task<BaseResponse<GameConfig>> Get()
|
|
{
|
|
var res = await _gameConfigService.Get();
|
|
return this.ToResult(res);
|
|
}
|
|
}
|
|
}
|