From 15317428909cabb0e8012fea7760eaf3abf569e0 Mon Sep 17 00:00:00 2001 From: rxdn <29165304+rxdn@users.noreply.github.com> Date: Fri, 22 Jul 2022 17:35:28 +0100 Subject: [PATCH] Check --- app/http/endpoints/api/whitelabel/whitelabelpost.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/http/endpoints/api/whitelabel/whitelabelpost.go b/app/http/endpoints/api/whitelabel/whitelabelpost.go index c9c416f..fc9c2f2 100644 --- a/app/http/endpoints/api/whitelabel/whitelabelpost.go +++ b/app/http/endpoints/api/whitelabel/whitelabelpost.go @@ -44,6 +44,11 @@ func WhitelabelPost(ctx *gin.Context) { return } + if bot.Id == 0 { + ctx.JSON(400, utils.ErrorStr("Invalid token")) + return + } + if !bot.Bot { ctx.JSON(400, utils.ErrorStr("Token is not of a bot user")) return