Fix comments

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
This commit is contained in:
dusanb94
2020-10-14 11:03:39 +02:00
parent 4da66aecbf
commit 436db8877d
+2 -2
View File
@@ -125,7 +125,7 @@ func (h *handler) Publish(c *session.Client, topic *string, payload *[]byte) {
}
h.logger.Info("Publish - client ID " + c.ID + " to the topic: " + *topic)
// Topics are in the format:
// channels/<channel_id>/messages/<subtopic>/.../ct/<content_type>
// ch/<channel_id>/msg/<subtopic>/.../ct/<content_type>
channelParts := channelRegExp.FindStringSubmatch(*topic)
if len(channelParts) < 1 {
@@ -190,7 +190,7 @@ func (h *handler) Disconnect(c *session.Client) {
func (h *handler) authAccess(username string, topic string) error {
// Topics are in the format:
// channels/<channel_id>/messages/<subtopic>/.../ct/<content_type>
// ch/<channel_id>/msg/<subtopic>/.../ct/<content_type>
if !channelRegExp.Match([]byte(topic)) {
h.logger.Info("Malformed topic: " + topic)
return errMalformedTopic