diff options
| author | Michael VanOverbeek <[email protected]> | 2017-02-15 21:30:58 +0000 |
|---|---|---|
| committer | Michael VanOverbeek <[email protected]> | 2017-02-15 21:31:03 +0000 |
| commit | 91f97a65b2c6d1fad3a211a6739a49d9908f69a2 (patch) | |
| tree | ae91161012ad62f8d35377369557bff14cd18718 /ShiftOS.Server/ShopBackend.cs | |
| parent | 9729d2ba5998351849b0fe7e755a3176de655bab (diff) | |
| download | shiftos_thereturn-91f97a65b2c6d1fad3a211a6739a49d9908f69a2.tar.gz shiftos_thereturn-91f97a65b2c6d1fad3a211a6739a49d9908f69a2.tar.bz2 shiftos_thereturn-91f97a65b2c6d1fad3a211a6739a49d9908f69a2.zip | |
whoa mud refactoring
Diffstat (limited to 'ShiftOS.Server/ShopBackend.cs')
| -rw-r--r-- | ShiftOS.Server/ShopBackend.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ShiftOS.Server/ShopBackend.cs b/ShiftOS.Server/ShopBackend.cs index 071417a..d8267b9 100644 --- a/ShiftOS.Server/ShopBackend.cs +++ b/ShiftOS.Server/ShopBackend.cs @@ -13,7 +13,7 @@ namespace ShiftOS.Server { public static class ShopBackend { - [MudRequest("update_shop_by_user")] + [MudRequest("update_shop_by_user", typeof(Dictionary<string, object>))] public static void UpdateShopByUser(string guid, object contents) { var args = contents as Dictionary<string, object>; @@ -37,7 +37,7 @@ namespace ShiftOS.Server Program.ClientDispatcher.DispatchTo("shop_added", guid, ""); } - [MudRequest("create_shop")] + [MudRequest("create_shop", typeof(Dictionary<string, object>))] public static void CreateShop(string guid, object contents) { var args = contents as Dictionary<string, object>; @@ -45,7 +45,7 @@ namespace ShiftOS.Server if (File.Exists("shops.json")) shopFile = JsonConvert.DeserializeObject<List<Shop>>(File.ReadAllText("shops.json")); - var newShop = JsonConvert.DeserializeObject<Shop>(contents as string); + var newShop = JsonConvert.DeserializeObject<Shop>(JsonConvert.SerializeObject(contents)); foreach (var shop in shopFile) { @@ -64,7 +64,7 @@ namespace ShiftOS.Server } - [MudRequest("user_shop_check")] + [MudRequest("user_shop_check", typeof(Dictionary<string, object>))] public static void UserShopCheck(string guid, object contents) { var args = contents as Dictionary<string, object>; @@ -85,7 +85,7 @@ namespace ShiftOS.Server Program.ClientDispatcher.DispatchTo("user_shop_check_result", guid, res.ToString()); } - [MudRequest("shop_getitems")] + [MudRequest("shop_getitems", typeof(Dictionary<string, object>))] public static void GetShopItems(string guid, object contents) { var args = contents as Dictionary<string, object>; @@ -111,7 +111,7 @@ namespace ShiftOS.Server } - [MudRequest("shop_getall")] + [MudRequest("shop_getall", null)] public static void GetAllShops(string guid, object contents) { var args = contents as Dictionary<string, object>; @@ -129,7 +129,7 @@ namespace ShiftOS.Server Program.ClientDispatcher.DispatchTo("shop_all", guid, shops); } - [MudRequest("user_get_shop")] + [MudRequest("user_get_shop", typeof(string))] public static void GetShop(string guid, object contents) { string shopOwner = contents as string; |
