mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
more golint cleanup
This commit is contained in:
parent
57d36f2545
commit
200ba4b9f8
@ -61,10 +61,10 @@ func RemoveChannelTopicTag(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check permission
|
// check permission
|
||||||
if act.GUID != guid && topicSlot.Topic.GUID != guid {
|
if act.GUID != guid && topicSlot.Topic.GUID != guid {
|
||||||
ErrResponse(w, http.StatusUnauthorized, errors.New("not creator of topic or host"))
|
ErrResponse(w, http.StatusUnauthorized, errors.New("not creator of topic or host"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = store.DB.Transaction(func(tx *gorm.DB) error {
|
err = store.DB.Transaction(func(tx *gorm.DB) error {
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetChannelCard adds contact to channel membership
|
||||||
func SetChannelCard(w http.ResponseWriter, r *http.Request) {
|
func SetChannelCard(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
account, code, err := ParamAgentToken(r, false)
|
account, code, err := ParamAgentToken(r, false)
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetChannelGroup adds sharing group to channel
|
||||||
func SetChannelGroup(w http.ResponseWriter, r *http.Request) {
|
func SetChannelGroup(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
account, code, err := BearerAppToken(r, false)
|
account, code, err := BearerAppToken(r, false)
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetChannelRevision notifies contact of updated channel revision
|
||||||
func SetChannelRevision(w http.ResponseWriter, r *http.Request) {
|
func SetChannelRevision(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
card, code, err := ParamContactToken(r, false)
|
card, code, err := ParamContactToken(r, false)
|
||||||
@ -28,6 +29,7 @@ func SetChannelRevision(w http.ResponseWriter, r *http.Request) {
|
|||||||
WriteResponse(w, nil)
|
WriteResponse(w, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NotifyChannelRevision stores updated channel revision
|
||||||
func NotifyChannelRevision(card *store.Card, revision int64) error {
|
func NotifyChannelRevision(card *store.Card, revision int64) error {
|
||||||
|
|
||||||
act := &card.Account
|
act := &card.Account
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetChannelSubject updates channel subject for account holder
|
||||||
func SetChannelSubject(w http.ResponseWriter, r *http.Request) {
|
func SetChannelSubject(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
account, code, err := ParamAgentToken(r, false)
|
account, code, err := ParamAgentToken(r, false)
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetChannelTopicConfirmed sets confirmation status of topic
|
||||||
func SetChannelTopicConfirmed(w http.ResponseWriter, r *http.Request) {
|
func SetChannelTopicConfirmed(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// scan parameters
|
// scan parameters
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetChannelTopicSubject sets subject of channel topic created by invoker
|
||||||
func SetChannelTopicSubject(w http.ResponseWriter, r *http.Request) {
|
func SetChannelTopicSubject(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// scan parameters
|
// scan parameters
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetChannelTopicTagSubject sets subject of tag created by invoker
|
||||||
func SetChannelTopicTagSubject(w http.ResponseWriter, r *http.Request) {
|
func SetChannelTopicTagSubject(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
// scan parameters
|
// scan parameters
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetCloseMessage delivers disconnection message to contact
|
||||||
func SetCloseMessage(w http.ResponseWriter, r *http.Request) {
|
func SetCloseMessage(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
var message DataMessage
|
var message DataMessage
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//SetGroupSubject sets subject of group under account
|
||||||
func SetGroupSubject(w http.ResponseWriter, r *http.Request) {
|
func SetGroupSubject(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
account, code, err := ParamAgentToken(r, true)
|
account, code, err := ParamAgentToken(r, true)
|
||||||
|
Loading…
Reference in New Issue
Block a user