From f3d4f84fde24bb92e7cf6a22d94a703c753f3cbe Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 14 Aug 2026 05:21:15 +0200 Subject: Working files and symlinks? --- Rhea/Controllers/NarController.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Rhea/Controllers/NarController.cs (limited to 'Rhea/Controllers/NarController.cs') diff --git a/Rhea/Controllers/NarController.cs b/Rhea/Controllers/NarController.cs new file mode 100644 index 0000000..7ba44ba --- /dev/null +++ b/Rhea/Controllers/NarController.cs @@ -0,0 +1,20 @@ +using Microsoft.AspNetCore.Mvc; + +namespace Rhea.Controllers; + +[ApiController] +public class NarController(RheaConfiguration cfg, StoreMetaService storeSvc) : ControllerBase +{ + [HttpHead("/nar/{hash}.nar.zst")] + public async Task CheckNixNarExists(string hash) + { + var path = await storeSvc.GetStorePathByBaseName(hash); + Response.StatusCode = string.IsNullOrWhiteSpace(path) ? 404 : 200; + } + + [HttpGet("/nar/{hash}.nar.zst")] + public async Task GetNixCacheInfo() + { + return ""; + } +} \ No newline at end of file -- cgit 1.5.1