Bläddra i källkod

Changed name for the log auth function

TC pushbot 5 4 år sedan
förälder
incheckning
e5723558be
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      mod/auth/authlogger/authlogger.go

+ 2 - 2
mod/auth/authlogger/authlogger.go

@@ -49,11 +49,11 @@ func NewLogger() (*Logger, error) {
 func (l *Logger) LogAuth(r *http.Request, loginStatus bool) error {
 	username, _ := mv(r, "username", true)
 	timestamp := time.Now().Unix()
-	return l.LogAuthByUsername(username, r.RemoteAddr, timestamp, loginStatus, "web")
+	return l.LogAuthByRequestInfo(username, r.RemoteAddr, timestamp, loginStatus, "web")
 }
 
 //Log the current authentication to record by custom filled information. Use LogAuth if your module is authenticating via web interface
-func (l *Logger) LogAuthByUsername(username string, remoteAddr string, timestamp int64, loginSuceed bool, authType string) error {
+func (l *Logger) LogAuthByRequestInfo(username string, remoteAddr string, timestamp int64, loginSuceed bool, authType string) error {
 	//Get the current month as the table name, create table if not exists
 	current := time.Now().UTC()
 	tableName := current.Format("Jan-2006")