17 lines
339 B
Go
17 lines
339 B
Go
|
|
package handlers
|
||
|
|
|
||
|
|
import (
|
||
|
|
"elTesto/internal/views/templates"
|
||
|
|
|
||
|
|
"github.com/gin-gonic/gin"
|
||
|
|
)
|
||
|
|
|
||
|
|
func ShowUsers(c *gin.Context) {
|
||
|
|
users := []map[string]interface{}{
|
||
|
|
{"id": 1, "username": "usuario1", "role": "admin"},
|
||
|
|
{"id": 2, "username": "usuario2", "role": "user"},
|
||
|
|
}
|
||
|
|
|
||
|
|
templates.Users(users).Render(c.Request.Context(), c.Writer)
|
||
|
|
}
|