mirror of
https://github.com/balzack/databag.git
synced 2025-04-21 00:55:16 +00:00
more golint cleanup
This commit is contained in:
parent
200ba4b9f8
commit
c944e61869
@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//SetNodeAccount creates token to reset account credentials
|
||||
func SetNodeAccount(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// get referenced account id
|
||||
@ -36,7 +37,7 @@ func SetNodeAccount(w http.ResponseWriter, r *http.Request) {
|
||||
TokenType: APPTokenReset,
|
||||
Token: token,
|
||||
AccountID: uint(accountID),
|
||||
Expires: time.Now().Unix() + APPCreateExpire,
|
||||
Expires: time.Now().Unix() + APPResetExpire,
|
||||
}
|
||||
|
||||
if err := store.DB.Create(&accountToken).Error; err != nil {
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
//SetNodeAccountStatus sets disabled status of account
|
||||
func SetNodeAccountStatus(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// get referenced account id
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//SetNodeConfig sets node configuration
|
||||
func SetNodeConfig(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// validate login
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//SetNodeStatus sets admin token for account
|
||||
func SetNodeStatus(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var config store.Config
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//SetOpenMessage delivers connection message to contact
|
||||
func SetOpenMessage(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var message DataMessage
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//SetProfile updates account public profile details
|
||||
func SetProfile(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
account, code, err := ParamAgentToken(r, true)
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//SetProfileImage updates public profile image of account
|
||||
func SetProfileImage(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
account, code, err := ParamAgentToken(r, true)
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//SetProfileRevision updates contact of updated public profile
|
||||
func SetProfileRevision(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
card, code, err := ParamContactToken(r, false)
|
||||
@ -28,6 +29,7 @@ func SetProfileRevision(w http.ResponseWriter, r *http.Request) {
|
||||
WriteResponse(w, nil)
|
||||
}
|
||||
|
||||
//NotifyProfileRevision stores update profile revision
|
||||
func NotifyProfileRevision(card *store.Card, revision int64) error {
|
||||
|
||||
act := &card.Account
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//SetViewRevision updates contact with view revision
|
||||
func SetViewRevision(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
card, code, err := ParamContactToken(r, false)
|
||||
@ -28,6 +29,7 @@ func SetViewRevision(w http.ResponseWriter, r *http.Request) {
|
||||
WriteResponse(w, nil)
|
||||
}
|
||||
|
||||
//NotifyViewRevision stores updated contact view revision
|
||||
func NotifyViewRevision(card *store.Card, revision int64) error {
|
||||
|
||||
act := &card.Account
|
||||
|
Loading…
x
Reference in New Issue
Block a user