diff --git a/app/http/endpoints/api/whitelabelget.go b/app/http/endpoints/api/whitelabelget.go index 81de924..383546b 100644 --- a/app/http/endpoints/api/whitelabelget.go +++ b/app/http/endpoints/api/whitelabelget.go @@ -35,10 +35,21 @@ func WhitelabelGet(ctx *gin.Context) { return } + // Get errors + errors, err := database.Client.WhitelabelErrors.GetRecent(bot.BotId, 10) + if err != nil { + ctx.JSON(500, gin.H{ + "success": false, + "error": err.Error(), + }) + return + } + ctx.JSON(200, gin.H{ "success": true, "id": strconv.FormatUint(bot.BotId, 10), "status": status, + "errors": errors, }) } } diff --git a/go.mod b/go.mod index 901226f..dd15133 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/BurntSushi/toml v0.3.1 github.com/TicketsBot/archiverclient v0.0.0-20200425115930-0ca198cc8306 github.com/TicketsBot/common v0.0.0-20200529141045-7426ad13f1a4 - github.com/TicketsBot/database v0.0.0-20200606205929-6851b2444a67 + github.com/TicketsBot/database v0.0.0-20200612170437-4f91fa8bf2f1 github.com/apex/log v1.1.2 github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible diff --git a/public/static/css/style.css b/public/static/css/style.css index 98cd0e5..5423a9d 100644 --- a/public/static/css/style.css +++ b/public/static/css/style.css @@ -15,6 +15,10 @@ body { color: white; } +::-webkit-scrollbar { + display: none; +} + .sidebar { background-size: cover; overflow-x: hidden !important; diff --git a/public/templates/views/whitelabel.tmpl b/public/templates/views/whitelabel.tmpl index fd6adbb..9df850c 100644 --- a/public/templates/views/whitelabel.tmpl +++ b/public/templates/views/whitelabel.tmpl @@ -46,8 +46,9 @@ +
Error | +
---|