Change URLs to use / instead of ?. It looks much nicer.

This commit is contained in:
Nick Martin
2012-10-04 23:51:31 -07:00
parent f6e15a5dd7
commit a1c93b6043
3 changed files with 9 additions and 9 deletions

View File

@@ -32,7 +32,7 @@
var match = content.match(
new RegExp(window.location.protocol + "//" +
window.location.host + "/#\\?reset-password/(\\S*)"));
window.location.host + "/#\\/reset-password/(\\S*)"));
test.isTrue(match);
resetPasswordToken = match[1];
}));
@@ -71,7 +71,7 @@
var match = content.match(
new RegExp(window.location.protocol + "//" +
window.location.host + "/#\\?validate-email/(\\S*)"));
window.location.host + "/#\\/validate-email/(\\S*)"));
test.isTrue(match);
validateEmailToken = match[1];
}));
@@ -150,7 +150,7 @@
var match = content.match(
new RegExp(window.location.protocol + "//" +
window.location.host + "/#\\?enroll-account/(\\S*)"));
window.location.host + "/#\\/enroll-account/(\\S*)"));
test.isTrue(match);
enrollAccountToken = match[1];
}));

View File

@@ -11,7 +11,7 @@
// strings so that the reset password token is not sent over the wire
// on the http request
var match;
match = window.location.hash.match(/^\#\?reset-password\/(.*)$/);
match = window.location.hash.match(/^\#\/reset-password\/(.*)$/);
if (match) {
Accounts._preventAutoLogin = true;
Accounts._resetPasswordToken = match[1];
@@ -28,7 +28,7 @@
// would be faster but less DDP-ish (and more specifically, any
// non-web DDP app, such as an iOS client, would do something more
// in line with the hash fragment approach)
match = window.location.hash.match(/^\#\?validate-email\/(.*)$/);
match = window.location.hash.match(/^\#\/validate-email\/(.*)$/);
if (match) {
Accounts._preventAutoLogin = true;
Accounts._validateEmailToken = match[1];
@@ -38,7 +38,7 @@
// reads an account enrollment token from the url's hash fragment, if
// it's there. also don't automatically log the user is, as for
// reset password links.
match = window.location.hash.match(/^\#\?enroll-account\/(.*)$/);
match = window.location.hash.match(/^\#\/enroll-account\/(.*)$/);
if (match) {
Accounts._preventAutoLogin = true;
Accounts._enrollAccountToken = match[1];

View File

@@ -5,13 +5,13 @@ if (!Accounts.urls)
Accounts.urls = {};
Accounts.urls.resetPassword = function (token) {
return Meteor.absoluteUrl('#?reset-password/' + token);
return Meteor.absoluteUrl('#/reset-password/' + token);
};
Accounts.urls.validateEmail = function (token) {
return Meteor.absoluteUrl('#?validate-email/' + token);
return Meteor.absoluteUrl('#/validate-email/' + token);
};
Accounts.urls.enrollAccount = function (token) {
return Meteor.absoluteUrl('#?enroll-account/' + token);
return Meteor.absoluteUrl('#/enroll-account/' + token);
};