put in ignore file

This commit is contained in:
2025-08-10 22:01:36 +10:00
parent c2bf5cad70
commit ba79e8f1c4
151 changed files with 21703 additions and 0 deletions
@@ -0,0 +1,47 @@
using FamilyTreeAPI.Entities;
using FamilyTreeAPI.Interface;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
namespace FamilyTreeAPI.Controllers;
[Route("api/[controller]")]
[ApiController]
public class RelationShipController : ControllerBase
{
private readonly IRelationShipd _repo;
public RelationShipController(IRelationShipd repo)
{
_repo = repo;
}
[HttpGet("[action]/{id}")]
public async Task<IActionResult> GetById(int id)
{
var list = await _repo.GetByIdAsync(id);
return Ok(list);
}
[HttpGet("[action]/{id}")]
public async Task<IActionResult> GetByPersonId(int id)
{
var list = await _repo.GetByPersonIdAsync(id);
return Ok(list);
}
[HttpPost("[action]/{id}")]
public async Task<IActionResult> DeleteById(int id)
{
var list = await _repo.GetByIdAsync(id);
return Ok(list);
}
[HttpPost("[action]")]
public async Task<IActionResult> SaveRelationShip([FromBody] RelationShiftContainer list)
{
//var currentUser = (User?)(HttpContext.Items["User"]);
//if (null == currentUser)
// return Unauthorized(new { message = "Unauthorized" });
var response = await _repo.SaveAsync(list.relationShips);
return Ok(response);
}
}