mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-21 21:58:21 -05:00
feat: news
This commit is contained in:
parent
8a82279ef2
commit
937e5aeb8c
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Minecraft_Realms_Emulator.Responses;
|
||||||
|
|
||||||
namespace Minecraft_Realms_Emulator.Controllers.Mco
|
namespace Minecraft_Realms_Emulator.Controllers.Mco
|
||||||
{
|
{
|
||||||
@ -8,7 +9,7 @@ namespace Minecraft_Realms_Emulator.Controllers.Mco
|
|||||||
{
|
{
|
||||||
[HttpGet("available")]
|
[HttpGet("available")]
|
||||||
public bool GetAvailable()
|
public bool GetAvailable()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,5 +18,16 @@ namespace Minecraft_Realms_Emulator.Controllers.Mco
|
|||||||
{
|
{
|
||||||
return Compatility.COMPATIBLE.ToString();
|
return Compatility.COMPATIBLE.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet("v1/news")]
|
||||||
|
public NewsResponse GetNews()
|
||||||
|
{
|
||||||
|
var news = new NewsResponse
|
||||||
|
{
|
||||||
|
NewsLink = "https://github.com/CyberL1/Minecraft-Realms-Emulator"
|
||||||
|
};
|
||||||
|
|
||||||
|
return news;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
7
Minecraft-Realms-Emulator/Responses/NewsResponse.cs
Normal file
7
Minecraft-Realms-Emulator/Responses/NewsResponse.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace Minecraft_Realms_Emulator.Responses
|
||||||
|
{
|
||||||
|
public class NewsResponse
|
||||||
|
{
|
||||||
|
public string NewsLink { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user