1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat(wip): leaderboard ui

This commit is contained in:
Ferdinand Mütsch
2022-10-03 10:53:27 +02:00
parent dba4da8641
commit b3fa032bde
9 changed files with 187 additions and 13 deletions

View File

@@ -0,0 +1,22 @@
package view
import "github.com/muety/wakapi/models"
type LeaderboardViewModel struct {
User *models.User
Items []*models.LeaderboardItem
ItemsByLanguage []*models.LeaderboardItem
ApiKey string
Success string
Error string
}
func (s *LeaderboardViewModel) WithSuccess(m string) *LeaderboardViewModel {
s.Success = m
return s
}
func (s *LeaderboardViewModel) WithError(m string) *LeaderboardViewModel {
s.Error = m
return s
}