- Update User type to include role field - Modify dashboard template to conditionally show admin links - Add protected dashboard route with user context - Update main.go to serve dashboard with proper authentication
14 lines
172 B
Go
14 lines
172 B
Go
package templates
|
|
|
|
type User struct {
|
|
ID string
|
|
Username string
|
|
Email string
|
|
Role string
|
|
}
|
|
|
|
type PageData struct {
|
|
User User
|
|
CurrentPage string
|
|
}
|