using ContactService.Infrastructure; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; namespace ContactService.WebApi.Controllers; [ApiController, Route("internal/management")] public sealed class ManagementController(ContactDbContext db) : ControllerBase { [HttpGet("relation/{owner:guid}/{target:guid}")] public async Task Relation(Guid owner, Guid target) => new { related = await db.Friends.AnyAsync(x => x.Owner.Id == owner && x.Target.Id == target) }; }