public ApiModule(IDataStore data) : base("/api") { _Data = data; Get["/messages/list"] = p => Response.AsJson(_Data.GetMessages()); Post["/messages/save"] = p => { _Data.AddMessage(Request.Form["Message"]); return "OK!"; }; }
public ApiModule(IDataStore data) : base("/api") { _Data = data; Get["/messages/list"] = p => Response.AsJson(_Data.GetMessages()); Post["/messages/save"] = p => { _Data.AddMessage(Request.Form["Message"]); return "OK!"; }; }