adjust postback
This commit is contained in:
@@ -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];
|
||||||
|
|||||||
@@ -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);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user