From e9c01ec8189fba963004fd7e0fad203b20a64a23 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 5 Nov 2012 19:46:09 +0000 Subject: [PATCH] Final fix (hopefully) to automation interface re. geographies --- Site5/Automation/GetGeographyData.asmx | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/Site5/Automation/GetGeographyData.asmx b/Site5/Automation/GetGeographyData.asmx index 362646aa..64ad3857 100644 --- a/Site5/Automation/GetGeographyData.asmx +++ b/Site5/Automation/GetGeographyData.asmx @@ -36,32 +36,15 @@ public class GetGeographyData : System.Web.Services.WebService { } [WebMethod] - public Geographies GetGeographiesFromRoot (int rootId) + public Geography GetGeography (int nodeId) { - return Geography.FromIdentity(rootId).GetTree(); + return Geography.FromIdentity(nodeId); } [WebMethod] - public Geographies GetGeographiesForCountry (string countryCode) + public Geography GetGeographyForCountry (string countryCode) { - Country country = Country.FromCode(countryCode); - return GetGeographiesFromRoot(country.GeographyId); + return Country.FromCode(countryCode).Geography; } - /* - - [WebMethod] - public BasicGeography[] GetGeographiesFromRoot (int rootId) - { - return PirateDb.GetDatabase().GetGeographyTree(rootId); - } - - [WebMethod] - public BasicGeography[] GetGeographiesForCountry (string countryCode) - { - Country country = Country.FromCode(countryCode); - return PirateDb.GetDatabase().GetGeographyTree(country.GeographyId); - } - - */ } \ No newline at end of file