Started working on API
This commit is contained in:
22
WD7UVN_HFT_2023241.Endpoint/DatabaseController.cs
Normal file
22
WD7UVN_HFT_2023241.Endpoint/DatabaseController.cs
Normal 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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user