using Microsoft.AspNetCore.Mvc; namespace WebApplication2.Controllers.WebNew { public class DetailItemController : Controller { [HttpGet("/WebNew/Layanan/DetailItem/")] public IActionResult Index(string kode) { ViewBag.Kode = kode; return View("~/Views/WebNew/Layanan/DetailItem.cshtml"); } [HttpGet("/WebNew/DetailItem/GetDetail/")] public IActionResult GetDetail(string kode) { var path = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot/webnew/json", "detail-item.json"); if (!System.IO.File.Exists(path)) return NotFound(); var json = System.IO.File.ReadAllText(path); return Content(json, "application/json"); } } }