mirror of
https://github.com/outbackdingo/databunker.git
synced 2026-01-27 18:18:43 +00:00
fix golang error
This commit is contained in:
@@ -40,7 +40,7 @@ func (dbobj dbcon) acceptAgreement(userTOKEN string, mode string, identity strin
|
||||
}
|
||||
encIdentity := ""
|
||||
if len(identity) > 0 {
|
||||
encIdentity := basicStringEncrypt(identity, dbobj.masterKey, dbobj.GetCode())
|
||||
encIdentity, _ := basicStringEncrypt(identity, dbobj.masterKey, dbobj.GetCode())
|
||||
}
|
||||
if len(userTOKEN) > 0 {
|
||||
// first check if this agreement exists, then update
|
||||
@@ -104,7 +104,7 @@ func (dbobj dbcon) withdrawAgreement(userTOKEN string, brief string, mode string
|
||||
// update date, status
|
||||
encIdentity := ""
|
||||
if len(identity) > 0 {
|
||||
encIdentity = basicStringEncrypt(identity, dbobj.masterKey, dbobj.GetCode())
|
||||
encIdentity, _ = basicStringEncrypt(identity, dbobj.masterKey, dbobj.GetCode())
|
||||
}
|
||||
bdoc := bson.M{}
|
||||
bdoc["when"] = now
|
||||
@@ -149,7 +149,7 @@ func (dbobj dbcon) listAgreementRecords(userTOKEN string) ([]byte, int, error) {
|
||||
}
|
||||
|
||||
func (dbobj dbcon) listAgreementRecordsByIdentity(identity string) ([]byte, int, error) {
|
||||
encIdentity := basicStringEncrypt(identity, dbobj.masterKey, dbobj.GetCode())
|
||||
encIdentity, _ := basicStringEncrypt(identity, dbobj.masterKey, dbobj.GetCode())
|
||||
records, err := dbobj.store.GetList(storage.TblName.Agreements, "who", encIdentity, 0, 0, "")
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
|
||||
@@ -88,11 +88,11 @@ func (e mainEnv) userNew(w http.ResponseWriter, r *http.Request, ps httprouter.P
|
||||
}
|
||||
encPhoneIdx := ""
|
||||
if len(parsedData.emailIdx) > 0 {
|
||||
encEmailIdx := basicStringEncrypt(parsedData.emailIdx, e.db.masterKey, e.db.GetCode())
|
||||
encEmailIdx, _ := basicStringEncrypt(parsedData.emailIdx, e.db.masterKey, e.db.GetCode())
|
||||
e.db.linkAgreementRecords(userTOKEN, encEmailIdx)
|
||||
}
|
||||
if len(parsedData.phoneIdx) > 0 {
|
||||
encPhoneIdx = basicStringEncrypt(parsedData.phoneIdx, e.db.masterKey, e.db.GetCode())
|
||||
encPhoneIdx, _ = basicStringEncrypt(parsedData.phoneIdx, e.db.masterKey, e.db.GetCode())
|
||||
e.db.linkAgreementRecords(userTOKEN, encPhoneIdx)
|
||||
}
|
||||
if len(parsedData.emailIdx) > 0 && len(parsedData.phoneIdx) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user