feat(api): add log settings management with auto-clear and clear days configuration

This commit is contained in:
Chang lue Tsen
2025-09-01 06:11:35 -04:00
parent 4184a32c0f
commit b6cae7bbb5
14 changed files with 210 additions and 6 deletions
+12
View File
@@ -185,6 +185,10 @@ type (
Total int64 `json:"total"`
List []TrafficLogDetails `json:"list"`
}
LogSetting {
AutoClear *bool `json:"auto_clear"`
ClearDays int64 `json:"clear_days"`
}
)
@server (
@@ -244,5 +248,13 @@ service ppanel {
@doc "Filter traffic log details"
@handler FilterTrafficLogDetails
get /traffic/details (FilterTrafficLogDetailsRequest) returns (FilterTrafficLogDetailsResponse)
@doc "Get log setting"
@handler GetLogSetting
get /setting returns (LogSetting)
@doc "Update log setting"
@handler UpdateLogSetting
post /setting (LogSetting)
}