实现定时通道过期清理
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"platform/pkg/env"
|
||||
auth2 "platform/web/auth"
|
||||
"platform/web/handlers"
|
||||
s "platform/web/services"
|
||||
"time"
|
||||
|
||||
q "platform/web/queries"
|
||||
@@ -33,6 +34,12 @@ func ApplyRouters(app *fiber.App) {
|
||||
}
|
||||
return ctx.JSON(rs)
|
||||
})
|
||||
debug.Get("/channel/clear-expired", func(ctx *fiber.Ctx) error {
|
||||
if err := s.Channel.ClearExpiredChannels(); err != nil {
|
||||
return err
|
||||
}
|
||||
return ctx.SendStatus(fiber.StatusOK)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user