feat(api): redis

This commit is contained in:
ttk
2024-10-16 19:30:48 +08:00
parent 0aadda2f10
commit eebad0b616
6 changed files with 241 additions and 33 deletions

View File

@@ -204,7 +204,7 @@ func (c *Controller) GetSessionReplay(ctx *gin.Context) {
ctx.AbortWithError(http.StatusInternalServerError, &ApiError{Code: ErrInternal, Data: map[string]any{"err": err}})
}
filename := sessionId
if session.IsSsh() {
if !session.IsGuacd() {
filename += ".cast"
}
ctx.FileAttachment(filepath.Join("/replay", filename), filename)