settings: add button to get logs

This commit is contained in:
Harvey Tindall
2021-12-30 17:54:27 +00:00
parent 8888807780
commit 51b59ae103
8 changed files with 33 additions and 1 deletions

9
api.go
View File

@@ -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 {