Started working on API

This commit is contained in:
2023-11-22 12:08:03 +01:00
parent 257ba3d2c3
commit 9ec6295a04

View File

@@ -0,0 +1,22 @@
using WD7UVN_HFT_2023241.Logic;
using Microsoft.AspNetCore.Mvc;
namespace WD7UVN_HFT_2023241.Endpoint
{
[ApiController]
[Route("api/[controller]")]
public class DatabaseController : ControllerBase
{
[HttpGet]
public IActionResult Get()
{
return Ok("This is a GET request.");
}
[HttpPost]
public IActionResult Post([FromBody] string value)
{
return Ok($"Received POST request with value: {value}");
}
}
}