deprecated 함수 제거
This commit is contained in:
@ -193,6 +193,8 @@ func (caller apiCaller) blockAPI(w http.ResponseWriter, r *http.Request) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mg.sessionProvider.Delete(accid)
|
||||
} else if r.Method == "DELETE" {
|
||||
id := r.URL.Query().Get("id")
|
||||
|
||||
@ -215,8 +217,6 @@ func (caller apiCaller) blockAPI(w http.ResponseWriter, r *http.Request) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mg.mongoClient.Delete(CollectionAuth, bson.M{"_id": idobj})
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -271,13 +271,16 @@ func (caller apiCaller) whitelistAPI(w http.ResponseWriter, r *http.Request) err
|
||||
func (caller apiCaller) serviceAPI(w http.ResponseWriter, r *http.Request) error {
|
||||
mg := caller.mg
|
||||
if r.Method == "GET" {
|
||||
logger.Println("serviceAPI :", r.URL.Path)
|
||||
if mg.service().Id.IsZero() {
|
||||
logger.Println(" id is zero")
|
||||
newService := serviceDescription{
|
||||
ServiceDescriptionSummary: ServiceDescriptionSummary{
|
||||
Id: primitive.NewObjectID(),
|
||||
},
|
||||
}
|
||||
if err := newService.prepare(caller.mg); err != nil {
|
||||
logger.Println(" prepare failed :", err)
|
||||
return err
|
||||
}
|
||||
atomic.StorePointer(&mg.serviceptr, unsafe.Pointer(&newService))
|
||||
|
||||
Reference in New Issue
Block a user