1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-23 14:45:37 +01:00
GiantsTools/Giants.WebApi/Controllers/CommunityController.cs

32 lines
796 B
C#
Raw Normal View History

2020-08-16 11:03:10 +02:00
namespace Giants.WebApi.Controllers
{
using Giants.DataContract.V1;
using Giants.Services;
using Microsoft.AspNetCore.Mvc;
[ApiController]
2020-10-12 23:42:44 +02:00
[ApiVersion("1.0")]
[ApiVersion("1.1")]
2020-08-16 11:03:10 +02:00
[Route("api/[controller]")]
public class CommunityController : ControllerBase
2020-08-16 11:03:10 +02:00
{
private readonly ICommunityService discordService;
2020-08-16 11:03:10 +02:00
public CommunityController(
ICommunityService communityService)
2020-08-16 11:03:10 +02:00
{
this.discordService = communityService;
2020-08-16 11:03:10 +02:00
}
[HttpGet]
public CommunityStatus GetDiscordStatus()
2020-08-16 11:03:10 +02:00
{
return new CommunityStatus
2020-08-16 11:03:10 +02:00
{
CommunityAppName = "Discord",
CommunityAppUri = this.discordService.GetDiscordUri()
2020-08-16 11:03:10 +02:00
};
}
}
}