Enforce Votifier version
This commit is contained in:
parent
29ed1cb231
commit
bf3d6ecb83
@ -170,12 +170,13 @@ func SendVoteHandler(ctx *fiber.Ctx) error {
|
|||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
if err = mcutil.SendVote(c, opts.Host, opts.Port, options.Vote{
|
if err = mcutil.SendVote(c, opts.Host, opts.Port, options.Vote{
|
||||||
PublicKey: opts.PublicKey,
|
RequireVersion: 1,
|
||||||
ServiceName: opts.ServiceName,
|
PublicKey: opts.PublicKey,
|
||||||
Username: opts.Username,
|
ServiceName: opts.ServiceName,
|
||||||
IPAddress: opts.IPAddress,
|
Username: opts.Username,
|
||||||
Timestamp: opts.Timestamp,
|
IPAddress: opts.IPAddress,
|
||||||
Timeout: opts.Timeout,
|
Timestamp: opts.Timestamp,
|
||||||
|
Timeout: opts.Timeout,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return ctx.Status(http.StatusBadRequest).SendString(err.Error())
|
return ctx.Status(http.StatusBadRequest).SendString(err.Error())
|
||||||
}
|
}
|
||||||
@ -187,12 +188,13 @@ func SendVoteHandler(ctx *fiber.Ctx) error {
|
|||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
if err = mcutil.SendVote(c, opts.Host, opts.Port, options.Vote{
|
if err = mcutil.SendVote(c, opts.Host, opts.Port, options.Vote{
|
||||||
ServiceName: opts.ServiceName,
|
RequireVersion: 2,
|
||||||
Username: opts.Username,
|
ServiceName: opts.ServiceName,
|
||||||
Token: opts.Token,
|
Username: opts.Username,
|
||||||
UUID: opts.UUID,
|
Token: opts.Token,
|
||||||
Timestamp: opts.Timestamp,
|
UUID: opts.UUID,
|
||||||
Timeout: opts.Timeout,
|
Timestamp: opts.Timestamp,
|
||||||
|
Timeout: opts.Timeout,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return ctx.Status(http.StatusBadRequest).SendString(err.Error())
|
return ctx.Status(http.StatusBadRequest).SendString(err.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user