Implement base controller for shared functionality; update existing controllers to inherit from BaseController and adjust user ID handling. Add JWT authentication support and modify item retrieval methods in GameDataController.

This commit is contained in:
2025-02-15 21:57:59 -03:00
parent 6d81ff1564
commit b84599b370
10 changed files with 72 additions and 31 deletions
+1 -3
View File
@@ -1,16 +1,14 @@
using Microsoft.AspNetCore.Mvc;
using PetCompanion.Models;
using PetCompanion.Services;
namespace PetCompanion.Controllers
{
[ApiController]
[Route("api/v1/[controller]")]
public class InventoryController : ControllerBase
public class InventoryController : BaseController
{
private readonly PetInventoryService inventoryService;
private readonly ILogger<InventoryController> logger;
private readonly Guid userId = Guid.Parse("f5f4b3b3-3b7b-4b7b-8b7b-7b7b7b7b7b7b");
public InventoryController(
ILogger<InventoryController> logger,