From 9a72716fd039e6cc198471e73a6504902c4712e5 Mon Sep 17 00:00:00 2001 From: trunglt251292 Date: Wed, 29 Jun 2022 09:00:30 +0700 Subject: [PATCH] [Update] Check permission payload --- struct.go | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/struct.go b/struct.go index 5e394e6..160205f 100644 --- a/struct.go +++ b/struct.go @@ -63,14 +63,25 @@ type Config struct { Nats natsio.Config } +// Agent ... +type Agent struct { + Source string `json:"source"` + IP string `json:"ip"` + Platform string `json:"platform"` + Version string `json:"version"` +} + // StaffCheckPermissionBody ... type StaffCheckPermissionBody struct { - StaffID string `json:"staffId"` - Token string `json:"token"` - Permission []string `json:"permission"` - Source string `json:"source"` - Code string `json:"code,omitempty"` - IsRoot string `json:"isRoot"` + StaffID string `json:"staffId"` + Token string `json:"token"` + Permission []string `json:"permission"` + Source string `json:"source"` + Code string `json:"code,omitempty"` + IsRoot string `json:"isRoot"` + Agent Agent `json:"agent"` + DeviceId string `json:"deviceId"` + Payload PayloadCheckPermission `json:"payload"` } // PayloadCheckPermission ...