新增通过手机号获取排队信息的内部接口
This commit is contained in:
@@ -85,7 +85,11 @@ func (s *Server) publicStatusByPhone(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, &apiError{Status: http.StatusNotFound, Code: "STATUS_NOT_FOUND", Message: "排队状态不存在或链接已失效"})
|
||||
return
|
||||
}
|
||||
if s.publicQueryLimiter != nil {
|
||||
s.statusByPhone(w, r, true)
|
||||
}
|
||||
|
||||
func (s *Server) statusByPhone(w http.ResponseWriter, r *http.Request, limitByClientIP bool) {
|
||||
if limitByClientIP && s.publicQueryLimiter != nil {
|
||||
if allowed, retry := s.publicQueryLimiter.allow("ip:" + publicQueryClientKey(r)); !allowed {
|
||||
writePublicQueryRateLimit(w, retry)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user