via

Simple pubsub server inspired by https://patchbay.pub/
git clone https://git.ce9e.org/via.git

commit
1d389dd00d56a1df2a9e5903173b4def51505fd8
parent
d5c79be01cf794d09180b33110aa640a29050e7f
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-10-15 07:54
mv getStoreagePath to top

Diffstat

M via.go 10 +++++-----

1 files changed, 5 insertions, 5 deletions


diff --git a/via.go b/via.go

@@ -40,6 +40,11 @@ func splitPassword(combined string) (string, string) {
   40    40 	}
   41    41 }
   42    42 
   -1    43 func getStorePath(key string) string {
   -1    44 	hash := base64.URLEncoding.EncodeToString([]byte(key))
   -1    45 	return path.Join(dir, hash)
   -1    46 }
   -1    47 
   43    48 func pushChannel(key string, password string, ch chan Msg) bool {
   44    49 	mux.RLock()
   45    50 	topic, ok := topics[key]
@@ -84,11 +89,6 @@ func popChannel(key string, ch chan Msg) {
   84    89 	}
   85    90 }
   86    91 
   87    -1 func getStorePath(key string) string {
   88    -1 	hash := base64.URLEncoding.EncodeToString([]byte(key))
   89    -1 	return path.Join(dir, hash)
   90    -1 }
   91    -1 
   92    92 func post(w http.ResponseWriter, r *http.Request) {
   93    93 	key, password := splitPassword(r.URL.Path)
   94    94