mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 07:06:36 +08:00
feat(core): bind request services and implement registered tasks
Wire plugin services through Bind/InjectFrom and AppContext so HTTP and workers resolve dependencies after Apply. Register TaskHandler objects with persisted results, and implement send_email_code, mail:send, cleanup_inactive_users, and dispatch_bot_msg.
This commit is contained in:
@@ -48,7 +48,7 @@ func abortTaskLogicError(c *gin.Context, err error) bool {
|
||||
// @Failure 403 {object} response.Any "无管理员权限"
|
||||
// @Router /api/v1/admin/tasks/types [get]
|
||||
func ListTaskTypes(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, response.OK(service.ListTaskTypes()))
|
||||
c.JSON(http.StatusOK, response.OK(service.ListTaskTypes(c.Request.Context())))
|
||||
}
|
||||
|
||||
// DispatchTask 下发任务
|
||||
|
||||
Reference in New Issue
Block a user