diff --git a/net/server/internal/api_addChannelTopic.go b/net/server/internal/api_addChannelTopic.go index 3237aa05..13458c3b 100644 --- a/net/server/internal/api_addChannelTopic.go +++ b/net/server/internal/api_addChannelTopic.go @@ -18,7 +18,7 @@ func AddChannelTopic(w http.ResponseWriter, r *http.Request) { return } - channelSlot, guid, err, code := getChannelSlot(r, true) + channelSlot, guid, code, err := getChannelSlot(r, true) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_addChannelTopicAsset.go b/net/server/internal/api_addChannelTopicAsset.go index 7e3c0cb7..06548ae6 100644 --- a/net/server/internal/api_addChannelTopicAsset.go +++ b/net/server/internal/api_addChannelTopicAsset.go @@ -28,7 +28,7 @@ func AddChannelTopicAsset(w http.ResponseWriter, r *http.Request) { } } - channelSlot, guid, err, code := getChannelSlot(r, true) + channelSlot, guid, code, err := getChannelSlot(r, true) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_addChannelTopicTag.go b/net/server/internal/api_addChannelTopicTag.go index f13bc337..06d039f9 100644 --- a/net/server/internal/api_addChannelTopicTag.go +++ b/net/server/internal/api_addChannelTopicTag.go @@ -22,7 +22,7 @@ func AddChannelTopicTag(w http.ResponseWriter, r *http.Request) { return } - channelSlot, guid, err, code := getChannelSlot(r, false) + channelSlot, guid, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_getCardDetail.go b/net/server/internal/api_getCardDetail.go index 61c07934..9e0dd70f 100644 --- a/net/server/internal/api_getCardDetail.go +++ b/net/server/internal/api_getCardDetail.go @@ -8,6 +8,7 @@ import ( "net/http" ) +//GetCardDetail retrieves attributes attributes assigned to card func GetCardDetail(w http.ResponseWriter, r *http.Request) { account, code, err := ParamAgentToken(r, false) diff --git a/net/server/internal/api_getCardImage.go b/net/server/internal/api_getCardImage.go index e75cf1a5..4454b3d4 100644 --- a/net/server/internal/api_getCardImage.go +++ b/net/server/internal/api_getCardImage.go @@ -11,6 +11,7 @@ import ( "time" ) +//GetCardProfileImage retrieves contacts profile image func GetCardProfileImage(w http.ResponseWriter, r *http.Request) { var data []byte diff --git a/net/server/internal/api_getCardProfile.go b/net/server/internal/api_getCardProfile.go index 7ff6086d..07dafd70 100644 --- a/net/server/internal/api_getCardProfile.go +++ b/net/server/internal/api_getCardProfile.go @@ -8,6 +8,7 @@ import ( "net/http" ) +//GetCardProfile retrieves contact's public profile func GetCardProfile(w http.ResponseWriter, r *http.Request) { account, code, err := ParamAgentToken(r, false) diff --git a/net/server/internal/api_getCards.go b/net/server/internal/api_getCards.go index 907d4fe2..17f348ce 100644 --- a/net/server/internal/api_getCards.go +++ b/net/server/internal/api_getCards.go @@ -6,6 +6,7 @@ import ( "strconv" ) +//GetCards retrieves all accounts contacts func GetCards(w http.ResponseWriter, r *http.Request) { var cardRevisionSet bool var cardRevision int64 diff --git a/net/server/internal/api_getChannelDetail.go b/net/server/internal/api_getChannelDetail.go index 45a89657..f9f8f09d 100644 --- a/net/server/internal/api_getChannelDetail.go +++ b/net/server/internal/api_getChannelDetail.go @@ -8,6 +8,7 @@ import ( "net/http" ) +//GetChannelDetail retrieve channel top level attributes func GetChannelDetail(w http.ResponseWriter, r *http.Request) { // scan parameters diff --git a/net/server/internal/api_getChannelSubjectField.go b/net/server/internal/api_getChannelSubjectField.go index 500373ac..e4bacf3d 100644 --- a/net/server/internal/api_getChannelSubjectField.go +++ b/net/server/internal/api_getChannelSubjectField.go @@ -10,6 +10,7 @@ import ( "time" ) +//GetChannelSubjectField retrieve base64 decoded field from channel subject func GetChannelSubjectField(w http.ResponseWriter, r *http.Request) { // scan parameters @@ -18,7 +19,7 @@ func GetChannelSubjectField(w http.ResponseWriter, r *http.Request) { elements := strings.Split(field, ".") // get channel stlot - channelSlot, _, err, code := getChannelSlot(r, false) + channelSlot, _, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_getChannelSummary.go b/net/server/internal/api_getChannelSummary.go index 5124ee86..e4fa9b83 100644 --- a/net/server/internal/api_getChannelSummary.go +++ b/net/server/internal/api_getChannelSummary.go @@ -8,6 +8,7 @@ import ( "net/http" ) +//GetChannelSummary retrieves latest channel topic func GetChannelSummary(w http.ResponseWriter, r *http.Request) { // scan parameters diff --git a/net/server/internal/api_getChannelTopic.go b/net/server/internal/api_getChannelTopic.go index ce956fb9..764dc221 100644 --- a/net/server/internal/api_getChannelTopic.go +++ b/net/server/internal/api_getChannelTopic.go @@ -14,7 +14,7 @@ func GetChannelTopic(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) topicID := params["topicID"] - channelSlot, _, err, code := getChannelSlot(r, false) + channelSlot, _, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return @@ -55,7 +55,7 @@ func isViewer(guid string, groups []store.Group) bool { return false } -func getChannelSlot(r *http.Request, member bool) (slot store.ChannelSlot, guid string, err error, code int) { +func getChannelSlot(r *http.Request, member bool) (slot store.ChannelSlot, guid string, code int, err error) { // scan parameters params := mux.Vars(r) diff --git a/net/server/internal/api_getChannelTopicAsset.go b/net/server/internal/api_getChannelTopicAsset.go index 82ff2301..86baf345 100644 --- a/net/server/internal/api_getChannelTopicAsset.go +++ b/net/server/internal/api_getChannelTopicAsset.go @@ -15,7 +15,7 @@ func GetChannelTopicAsset(w http.ResponseWriter, r *http.Request) { topicID := params["topicID"] assetID := params["assetID"] - channelSlot, _, err, code := getChannelSlot(r, true) + channelSlot, _, code, err := getChannelSlot(r, true) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_getChannelTopicAssets.go b/net/server/internal/api_getChannelTopicAssets.go index 0732ecb0..6257a3c2 100644 --- a/net/server/internal/api_getChannelTopicAssets.go +++ b/net/server/internal/api_getChannelTopicAssets.go @@ -14,7 +14,7 @@ func GetChannelTopicAssets(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) topicID := params["topicID"] - channelSlot, guid, err, code := getChannelSlot(r, true) + channelSlot, guid, code, err := getChannelSlot(r, true) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_getChannelTopicDetail.go b/net/server/internal/api_getChannelTopicDetail.go index 5b372b8f..719c213e 100644 --- a/net/server/internal/api_getChannelTopicDetail.go +++ b/net/server/internal/api_getChannelTopicDetail.go @@ -20,7 +20,7 @@ func GetChannelTopicDetail(w http.ResponseWriter, r *http.Request) { return } - channelSlot, _, err, code := getChannelSlot(r, false) + channelSlot, _, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_getChannelTopicSubjectField.go b/net/server/internal/api_getChannelTopicSubjectField.go index 743e3ea2..5d17cea9 100644 --- a/net/server/internal/api_getChannelTopicSubjectField.go +++ b/net/server/internal/api_getChannelTopicSubjectField.go @@ -21,7 +21,7 @@ func GetChannelTopicSubjectField(w http.ResponseWriter, r *http.Request) { field := params["field"] elements := strings.Split(field, ".") - channelSlot, _, err, code := getChannelSlot(r, false) + channelSlot, _, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_getChannelTopicTagSubjectField.go b/net/server/internal/api_getChannelTopicTagSubjectField.go index 012ea2e4..d3acfef8 100644 --- a/net/server/internal/api_getChannelTopicTagSubjectField.go +++ b/net/server/internal/api_getChannelTopicTagSubjectField.go @@ -22,7 +22,7 @@ func GetChannelTopicTagSubjectField(w http.ResponseWriter, r *http.Request) { field := params["field"] elements := strings.Split(field, ".") - channelSlot, _, err, code := getChannelSlot(r, false) + channelSlot, _, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_getChannelTopicTags.go b/net/server/internal/api_getChannelTopicTags.go index 83ce1144..9b5d8a53 100644 --- a/net/server/internal/api_getChannelTopicTags.go +++ b/net/server/internal/api_getChannelTopicTags.go @@ -28,7 +28,7 @@ func GetChannelTopicTags(w http.ResponseWriter, r *http.Request) { var count int // load channel slot - channelSlot, _, err, code := getChannelSlot(r, false) + channelSlot, _, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_getChannelTopics.go b/net/server/internal/api_getChannelTopics.go index 1f9d5b65..cc24590e 100644 --- a/net/server/internal/api_getChannelTopics.go +++ b/net/server/internal/api_getChannelTopics.go @@ -24,7 +24,7 @@ func GetChannelTopics(w http.ResponseWriter, r *http.Request) { var countSet bool var count int - channelSlot, _, err, code := getChannelSlot(r, false) + channelSlot, _, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_removeChannelTopic.go b/net/server/internal/api_removeChannelTopic.go index d51f82d5..66f9c5e7 100644 --- a/net/server/internal/api_removeChannelTopic.go +++ b/net/server/internal/api_removeChannelTopic.go @@ -15,7 +15,7 @@ func RemoveChannelTopic(w http.ResponseWriter, r *http.Request) { channelID := params["channelID"] topicID := params["topicID"] - channelSlot, guid, err, code := getChannelSlot(r, true) + channelSlot, guid, code, err := getChannelSlot(r, true) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_removeChannelTopicAsset.go b/net/server/internal/api_removeChannelTopicAsset.go index 44a2aedf..d0d18f5b 100644 --- a/net/server/internal/api_removeChannelTopicAsset.go +++ b/net/server/internal/api_removeChannelTopicAsset.go @@ -15,7 +15,7 @@ func RemoveChannelTopicAsset(w http.ResponseWriter, r *http.Request) { topicID := params["topicID"] assetID := params["assetID"] - channelSlot, guid, err, code := getChannelSlot(r, true) + channelSlot, guid, code, err := getChannelSlot(r, true) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_removeChannelTopicTag.go b/net/server/internal/api_removeChannelTopicTag.go index 63c2fd0b..8d1668c2 100644 --- a/net/server/internal/api_removeChannelTopicTag.go +++ b/net/server/internal/api_removeChannelTopicTag.go @@ -16,7 +16,7 @@ func RemoveChannelTopicTag(w http.ResponseWriter, r *http.Request) { topicID := params["topicID"] tagID := params["tagID"] - channelSlot, guid, err, code := getChannelSlot(r, false) + channelSlot, guid, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_setChannelTopicConfirmed.go b/net/server/internal/api_setChannelTopicConfirmed.go index 6f1d3fba..e03f93a7 100644 --- a/net/server/internal/api_setChannelTopicConfirmed.go +++ b/net/server/internal/api_setChannelTopicConfirmed.go @@ -24,7 +24,7 @@ func SetChannelTopicConfirmed(w http.ResponseWriter, r *http.Request) { return } - channelSlot, _, err, code := getChannelSlot(r, true) + channelSlot, _, code, err := getChannelSlot(r, true) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_setChannelTopicSubject.go b/net/server/internal/api_setChannelTopicSubject.go index 038436b6..4cdbe54d 100644 --- a/net/server/internal/api_setChannelTopicSubject.go +++ b/net/server/internal/api_setChannelTopicSubject.go @@ -21,7 +21,7 @@ func SetChannelTopicSubject(w http.ResponseWriter, r *http.Request) { return } - channelSlot, guid, err, code := getChannelSlot(r, true) + channelSlot, guid, code, err := getChannelSlot(r, true) if err != nil { ErrResponse(w, code, err) return diff --git a/net/server/internal/api_setChannelTopicTagSubject.go b/net/server/internal/api_setChannelTopicTagSubject.go index e0b66152..e5404a0e 100644 --- a/net/server/internal/api_setChannelTopicTagSubject.go +++ b/net/server/internal/api_setChannelTopicTagSubject.go @@ -22,7 +22,7 @@ func SetChannelTopicTagSubject(w http.ResponseWriter, r *http.Request) { return } - channelSlot, guid, err, code := getChannelSlot(r, false) + channelSlot, guid, code, err := getChannelSlot(r, false) if err != nil { ErrResponse(w, code, err) return