Convert front end paths from /users/ to /u/

This commit is contained in:
Robin Ward
2017-03-28 12:16:58 -04:00
parent 6b976433c9
commit 45a257815a
40 changed files with 129 additions and 84 deletions

View File

@ -65,10 +65,6 @@ export function postUrl(slug, topicId, postNumber) {
return url;
}
export function userUrl(username) {
return Discourse.getURL("/users/" + username.toLowerCase());
}
export function emailValid(email) {
// see: http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
const re = /^[a-zA-Z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-zA-Z0-9!#$%&'\*+\/=?\^_`{|}~\-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/;