using System.Text.Json.Serialization; using SPTarkov.DI.Annotations; namespace SPTarkov.Server.Core.Services; [Injectable(InjectionType.Singleton)] public class MatchLocationService { protected readonly Dictionary _locations = new(); /// /// DisbandRaidGroup /// /// public void DeleteGroup(DeleteGroupRequest request) { // Find group by id by iterating over all locations and looking for it by groupId foreach (var locationKvP in _locations) { var matchingGroup = _locations[locationKvP.Key].Groups.FirstOrDefault(groupKvP => groupKvP == request.GroupId); if (matchingGroup != null) { _locations[locationKvP.Key].Groups.Remove(request.GroupId); return; } } } public class MatchGroup { [JsonPropertyName("groups")] public List Groups { get; set; } } public class DeleteGroupRequest { [JsonPropertyName("groupId")] public string GroupId { get; set; } } }