block 테스트 함수 추가

This commit is contained in:
2023-12-28 16:55:38 +09:00
parent bb9b3a9735
commit d5708a964f
3 changed files with 27 additions and 22 deletions

View File

@ -198,6 +198,9 @@ func (caller apiCaller) blockAPI(w http.ResponseWriter, r *http.Request) error {
logger.Println("account is not blocked. err :", err)
} else {
logger.Println("account is blocked :", meta)
bi.Accid = accid
caller.mg.bl.add(&bi)
mg.sessionProvider.Delete(accid)
}
}
@ -223,6 +226,8 @@ func (caller apiCaller) blockAPI(w http.ResponseWriter, r *http.Request) error {
if err != nil {
return err
}
caller.mg.bl.remove(idobj)
}
return nil
}