initial commit

This commit is contained in:
2025-01-31 23:41:30 -03:00
commit 4c4036a266
22 changed files with 810 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using Microsoft.AspNetCore.Mvc;
using pet_companion_api.Services;
namespace pet_companion_api.Controllers
{
[ApiController]
[Route("api/v1/[controller]")]
public class PetController : ControllerBase
{
private readonly PetService petService;
private readonly ILogger<PetController> logger;
private Guid userId = Guid.Parse("f5f4b3b3-3b7b-4b7b-8b7b-7b7b7b7b7b7b");
public PetController(ILogger<PetController> logger, PetService petService)
{
this.logger = logger;
this.petService = petService;
}
[HttpGet("")]
public IActionResult GetAllPets()
{
return Ok(petService.GetAllPets(userId));
}
}
}