mirror of
https://github.com/yawaflua/oembed-tests.yawaflua.ru.git
synced 2025-12-08 19:39:29 +02:00
Code cleaning
This commit is contained in:
@@ -10,6 +10,8 @@ namespace OembedTests.Controllers
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<IActionResult> GetOembed([FromQuery]string url, [FromQuery] string? format = "json")
|
public async Task<IActionResult> GetOembed([FromQuery]string url, [FromQuery] string? format = "json")
|
||||||
{
|
{
|
||||||
|
// This is just example
|
||||||
|
// TODO: rework this plz
|
||||||
var userName = url.Replace("https://oembed-test.yawaflua.ru/pay/", "");
|
var userName = url.Replace("https://oembed-test.yawaflua.ru/pay/", "");
|
||||||
var response = $@"{{
|
var response = $@"{{
|
||||||
""version"": ""1.0"",
|
""version"": ""1.0"",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace OembedTests.Controllers
|
|||||||
{
|
{
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("pay")]
|
[Route("pay")]
|
||||||
public class WeatherForecastController : ControllerBase
|
public class PayController : ControllerBase
|
||||||
{
|
{
|
||||||
|
|
||||||
[HttpGet("/{userName}")]
|
[HttpGet("/{userName}")]
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
namespace OembedTests
|
|
||||||
{
|
|
||||||
public class WeatherForecast
|
|
||||||
{
|
|
||||||
public DateOnly Date { get; set; }
|
|
||||||
|
|
||||||
public int TemperatureC { get; set; }
|
|
||||||
|
|
||||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
|
||||||
|
|
||||||
public string? Summary { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user