adjust postback

This commit is contained in:
Tommy Parnell
2015-03-19 00:32:53 -04:00
parent a635d605d8
commit 2fadf6339b
2 changed files with 1 additions and 5 deletions

View File

@@ -11,10 +11,6 @@ namespace UntappedWidgetGenerator.Web
{ {
Get["/"] = x => { return View["Views/Index/Index.cshtml", "tparnell"]; }; Get["/"] = x => { return View["Views/Index/Index.cshtml", "tparnell"]; };
Get["/{username}"] = parameters => Get["/{username}"] = parameters =>
{
return View["Views/Index/Index.cshtml", (string)parameters.username];
};
Post["/{username}"] = parameters =>
{ {
var info = new UntappedRepository().Get(parameters.username); var info = new UntappedRepository().Get(parameters.username);
return View["Profile", info]; return View["Profile", info];

View File

@@ -2,7 +2,7 @@
$.fn.untappd = function (username) { $.fn.untappd = function (username) {
this.each(function () { this.each(function () {
var that = this; var that = this;
$.post("http://untappedwidget.azurewebsites.net/" + username) $.get("http://untappedwidget.azurewebsites.net/" + username)
.success(function (data) { .success(function (data) {
$(that).html(data); $(that).html(data);
}); });