모듈 업데이트

This commit is contained in:
2023-09-04 14:37:58 +09:00
parent caed2b5925
commit 087743453c
3 changed files with 8 additions and 6 deletions

View File

@ -311,7 +311,7 @@ func (sh *serviceDescription) link(w http.ResponseWriter, r *http.Request) {
//if oldAuth.Token != oldToken || oldAuth.Uid != oldId || oldAuth.Platform != oldType {
if oldAuth.Uid != oldId || oldAuth.Platform != oldType {
logger.Println("link failed. session key is not correct :", *oldAuth, queryvals)
logger.Println("link failed. session key is not correct :", oldAuth, queryvals)
w.WriteHeader(http.StatusBadRequest)
return
}
@ -425,7 +425,7 @@ func (sh *serviceDescription) unlink(w http.ResponseWriter, r *http.Request) {
// fmt.Println("=================")
if authInfo.Uid != sId || authInfo.Platform != sType {
logger.Println("unlink failed. session key is not correct :", *authInfo, queryvals)
logger.Println("unlink failed. session key is not correct :", authInfo, queryvals)
w.WriteHeader(http.StatusBadRequest)
return
}
@ -517,7 +517,7 @@ func (sh *serviceDescription) linkinfo(w http.ResponseWriter, r *http.Request) {
//if oldAuth.Token != oldToken || oldAuth.Uid != oldId || oldAuth.Platform != oldType {
if authInfo.Uid != sId || authInfo.Platform != sType {
logger.Println("linkinfo failed. session key is not correct :", *authInfo, queryvals)
logger.Println("linkinfo failed. session key is not correct :", authInfo, queryvals)
w.WriteHeader(http.StatusBadRequest)
return
}
@ -739,7 +739,7 @@ func (sh *serviceDescription) serveHTTP(w http.ResponseWriter, r *http.Request)
return
}
if authInfo == nil {
if authInfo.Account.IsZero() {
logger.Println("sessionkey is not valid :", sk)
w.WriteHeader(http.StatusUnauthorized)
return
@ -767,7 +767,7 @@ func (sh *serviceDescription) serveHTTP(w http.ResponseWriter, r *http.Request)
return
}
if authInfo == nil {
if authInfo.Account.IsZero() {
logger.Println("sessionkey is not valid :", sk)
w.WriteHeader(http.StatusUnauthorized)
return

2
go.mod
View File

@ -7,7 +7,7 @@ require (
github.com/golang-jwt/jwt v3.2.2+incompatible
go.mongodb.org/mongo-driver v1.11.7
google.golang.org/api v0.128.0
repositories.action2quare.com/ayo/gocommon v0.0.0-20230904025656-0eefb438a6d3
repositories.action2quare.com/ayo/gocommon v0.0.0-20230904053533-821dc5c639d8
)
require (

2
go.sum
View File

@ -359,3 +359,5 @@ repositories.action2quare.com/ayo/gocommon v0.0.0-20230904005440-d396a35713ad h1
repositories.action2quare.com/ayo/gocommon v0.0.0-20230904005440-d396a35713ad/go.mod h1:PdpZ16O1czKKxCxn+0AFNaEX/0kssYwC3G8jR0V7ybw=
repositories.action2quare.com/ayo/gocommon v0.0.0-20230904025656-0eefb438a6d3 h1:6IBLAxab5ntTG+TGjvd7+Pm+QHipQMS7GKg+XrXjn88=
repositories.action2quare.com/ayo/gocommon v0.0.0-20230904025656-0eefb438a6d3/go.mod h1:PdpZ16O1czKKxCxn+0AFNaEX/0kssYwC3G8jR0V7ybw=
repositories.action2quare.com/ayo/gocommon v0.0.0-20230904053533-821dc5c639d8 h1:clQB7s726Rt/q2BgGjZMVjek7Z0YDBUrD4HjFKUFSIw=
repositories.action2quare.com/ayo/gocommon v0.0.0-20230904053533-821dc5c639d8/go.mod h1:PdpZ16O1czKKxCxn+0AFNaEX/0kssYwC3G8jR0V7ybw=