Use another server

This commit is contained in:
Philipp Heckel 2022-02-28 16:56:38 -05:00
parent 17e5af654b
commit f23c7a2dbf
9 changed files with 131 additions and 28 deletions

View file

@ -11,8 +11,12 @@ export const topicUrlAuth = (baseUrl, topic) => `${topicUrl(baseUrl, topic)}/aut
export const topicShortUrl = (baseUrl, topic) => shortUrl(topicUrl(baseUrl, topic));
export const shortUrl = (url) => url.replaceAll(/https?:\/\//g, "");
export const validUrl = (url) => {
return url.match(/^https?:\/\//);
}
export const validTopic = (topic) => {
return topic.match(/^([-_a-zA-Z0-9]{1,64})$/) // Regex must match Go & Android app!
return topic.match(/^([-_a-zA-Z0-9]{1,64})$/); // Regex must match Go & Android app!
}
// Format emojis (see emoji.js)