feat: save and query request client ip for relay router; fix air theme bugs at log page;

This commit is contained in:
林水溶
2024-03-17 21:42:56 +09:00
parent 0eb2272bb7
commit cab01a8ebb
14 changed files with 120 additions and 46 deletions

View File

@@ -20,7 +20,8 @@ func GetAllLogs(c *gin.Context) {
tokenName := c.Query("token_name")
modelName := c.Query("model_name")
channel, _ := strconv.Atoi(c.Query("channel"))
logs, err := model.GetAllLogs(logType, startTimestamp, endTimestamp, modelName, username, tokenName, p*config.ItemsPerPage, config.ItemsPerPage, channel)
clientIP := c.Query("client_ip")
logs, err := model.GetAllLogs(logType, startTimestamp, endTimestamp, modelName, username, tokenName, p*config.ItemsPerPage, config.ItemsPerPage, channel, clientIP)
if err != nil {
c.JSON(http.StatusOK, gin.H{
"success": false,