deprecated 함수 제거
This commit is contained in:
@ -9,7 +9,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
@ -40,7 +39,6 @@ var noauth = flagx.Bool("noauth", false, "")
|
||||
|
||||
var (
|
||||
CollectionLink = gocommon.CollectionName("link")
|
||||
CollectionAuth = gocommon.CollectionName("auth")
|
||||
CollectionWhitelist = gocommon.CollectionName("whitelist")
|
||||
CollectionService = gocommon.CollectionName("service")
|
||||
CollectionAccount = gocommon.CollectionName("account")
|
||||
@ -267,12 +265,6 @@ func (mg *Maingate) prepare(context context.Context) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeUniqueIndices(CollectionAuth, map[string]bson.D{
|
||||
"skonly": {{Key: "sk", Value: 1}},
|
||||
}); err != nil {
|
||||
return makeErrorWithStack(err)
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeUniqueIndices(CollectionLink, map[string]bson.D{
|
||||
"platformuid": {{Key: "platform", Value: 1}, {Key: "uid", Value: 1}},
|
||||
}); err != nil {
|
||||
@ -302,10 +294,6 @@ func (mg *Maingate) prepare(context context.Context) (err error) {
|
||||
return makeErrorWithStack(err)
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeExpireIndex(CollectionAuth, int32(mg.SessionTTL+300)); err != nil {
|
||||
return makeErrorWithStack(err)
|
||||
}
|
||||
|
||||
if *devflag {
|
||||
// 에러 체크하지 말것
|
||||
mg.mongoClient.DropIndex(CollectionBlock, "codeaccid")
|
||||
@ -554,7 +542,7 @@ func (mg *Maingate) GeneratePlatformLoginNonceKey() string {
|
||||
const allowed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||
b := make([]byte, 52)
|
||||
for i := range b {
|
||||
b[i] = allowed[rand.Intn(len(allowed))]
|
||||
b[i] = allowed[r.Intn(len(allowed))]
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user