mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
settings: add button to get logs
This commit is contained in:
9
api.go
9
api.go
@@ -2847,6 +2847,15 @@ func (app *appContext) restart(gc *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// @Summary Returns the last 100 lines of the log.
|
||||
// @Router /log [get]
|
||||
// @Success 200 {object} LogDTO
|
||||
// @Security Bearer
|
||||
// @tags Other
|
||||
func (app *appContext) GetLog(gc *gin.Context) {
|
||||
gc.JSON(200, LogDTO{lineCache.String()})
|
||||
}
|
||||
|
||||
// no need to syscall.exec anymore!
|
||||
func (app *appContext) Restart() error {
|
||||
if TRAY {
|
||||
|
||||
Reference in New Issue
Block a user