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")]
|
2020-08-16 11:03:10 +02:00
|
|
|
|
[Route("api/[controller]")]
|
2020-08-16 12:08:49 +02:00
|
|
|
|
public class CommunityController : ControllerBase
|
2020-08-16 11:03:10 +02:00
|
|
|
|
{
|
2020-08-16 12:08:49 +02:00
|
|
|
|
private readonly ICommunityService discordService;
|
2020-08-16 11:03:10 +02:00
|
|
|
|
|
2020-08-16 12:08:49 +02:00
|
|
|
|
public CommunityController(
|
|
|
|
|
ICommunityService communityService)
|
2020-08-16 11:03:10 +02:00
|
|
|
|
{
|
2020-08-16 12:08:49 +02:00
|
|
|
|
this.discordService = communityService;
|
2020-08-16 11:03:10 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
2020-08-16 12:08:49 +02:00
|
|
|
|
public CommunityStatus GetDiscordStatus()
|
2020-08-16 11:03:10 +02:00
|
|
|
|
{
|
2020-08-16 12:08:49 +02:00
|
|
|
|
return new CommunityStatus
|
2020-08-16 11:03:10 +02:00
|
|
|
|
{
|
2020-08-16 12:08:49 +02:00
|
|
|
|
CommunityAppName = "Discord",
|
|
|
|
|
CommunityAppUri = this.discordService.GetDiscordUri()
|
2020-08-16 11:03:10 +02:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|