mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-11-02 10:16:51 +01:00
Refactor Admin Tools Template and Handler Context
- Updated the AdminTools template to format JSON payloads for better readability. - Modified the HandleAdminTools function to create a template context with user information before rendering the AdminTools view.
This commit is contained in:
1 parent
7de4f57fc3
commit
874c7ad69e
2 files changed
+52
-49
No files matched your search
@@ -84,7 +84,10 @@ func (h *Handlers) HandleAdminTools(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
components.AdminTools(c.Request.Context(), data).Render(c.Request.Context(), c.Writer)
|
||||
// Create template context with user information
|
||||
ctx := components.CreateTemplateContext(c)
|
||||
|
||||
components.AdminTools(ctx, data).Render(ctx, c.Writer)
|
||||
}
|
||||
|
||||
// HandleBackupDatabase handles the backup database request
|
||||
|
||||
Reference in new issue
Block a user