mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
more golint cleanup
This commit is contained in:
parent
18616539d3
commit
118404c77f
@ -16,7 +16,7 @@ func GetAccountAsset(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
//RemoveAccount TODO remove app attached to account
|
||||
//RemoveAccountApp TODO remove app attached to account
|
||||
func RemoveAccountApp(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//AddArticle add a new article for account specified by agent query param
|
||||
func AddArticle(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
account, code, err := ParamAgentToken(r, false)
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//AddCard adds contact to account specified by agent query param
|
||||
func AddCard(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
account, code, err := ParamAgentToken(r, false)
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//AddChannel adds a channel to account specified by qgent query param
|
||||
func AddChannel(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
account, code, err := ParamAgentToken(r, false)
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//AddChannelTopic adds a topic to a channel through either contact or agent query param
|
||||
func AddChannelTopic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
confirm := r.FormValue("confirm")
|
||||
|
@ -14,6 +14,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
//AddChannelTopicAsset adds an asset to a topic and queues it for appropriate transform
|
||||
func AddChannelTopicAsset(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// scan parameters
|
||||
@ -82,7 +83,7 @@ func AddChannelTopicAsset(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
crc, size, err := SaveAsset(file, path)
|
||||
crc, size, err := saveAsset(file, path)
|
||||
if err != nil {
|
||||
ErrResponse(w, http.StatusInternalServerError, err)
|
||||
return
|
||||
@ -193,7 +194,7 @@ func isStorageFull(act *store.Account) (full bool, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func SaveAsset(src io.Reader, path string) (crc uint32, size int64, err error) {
|
||||
func saveAsset(src io.Reader, path string) (crc uint32, size int64, err error) {
|
||||
|
||||
output, res := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0666)
|
||||
if res != nil {
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//AddChannelTopicTag adds a tag to a specified topic
|
||||
func AddChannelTopicTag(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// scan parameters
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//AddGroup adds a group to account identified by agent query param
|
||||
func AddGroup(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
account, code, err := ParamAgentToken(r, true)
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//AddNodeAccount generate a new token to be used for account creation
|
||||
func AddNodeAccount(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if code, err := ParamAdminToken(r); err != nil {
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//AddNodeAccountAccess generate a new token to be use for account login reset
|
||||
func AddNodeAccountAccess(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
params := mux.Vars(r)
|
||||
|
Loading…
Reference in New Issue
Block a user