Restructure
This commit is contained in:
parent
8c0f3b2304
commit
c6c3caec39
7 changed files with 6 additions and 13 deletions
6
web/src/app/utils.js
Normal file
6
web/src/app/utils.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
export const topicUrl = (baseUrl, topic) => `${baseUrl}/${topic}`;
|
||||
export const topicUrlWs = (baseUrl, topic) => `${topicUrl(baseUrl, topic)}/ws`
|
||||
.replaceAll("https://", "wss://")
|
||||
.replaceAll("http://", "ws://");
|
||||
export const shortUrl = (url) => url.replaceAll(/https?:\/\//g, "");
|
||||
export const shortTopicUrl = (baseUrl, topic) => shortUrl(topicUrl(baseUrl, topic));
|
Loading…
Add table
Add a link
Reference in a new issue