diff --git a/action_get_device_permissions.go b/action_get_staff_permissions.go similarity index 74% rename from action_get_device_permissions.go rename to action_get_staff_permissions.go index ec16f5d..8fa62fb 100644 --- a/action_get_device_permissions.go +++ b/action_get_staff_permissions.go @@ -7,8 +7,8 @@ import ( "github.com/Selly-Modules/logger" ) -// GetDevicePermissionsByToken ... -func (s Service) GetDevicePermissionsByToken(token string) (doc StaffDevicePermissions) { +// GetStaffPermissionsByToken ... +func (s Service) GetStaffPermissionsByToken(token string) (doc StaffPermissions) { ctx := context.Background() stm, args, _ := s.Builder. @@ -19,7 +19,7 @@ func (s Service) GetDevicePermissionsByToken(token string) (doc StaffDevicePermi Where("dm.auth_token = ?", token). ToSql() if err := s.DB.GetContext(ctx, &doc, stm, args...); err != nil { - logger.Error("devicemngt - GetDevicePermissionsByToken", logger.LogData{ + logger.Error("devicemngt - GetStaffPermissionsByToken", logger.LogData{ "token": token, "error": err.Error(), }) diff --git a/model.go b/model.go index 24e1812..dca8dde 100644 --- a/model.go +++ b/model.go @@ -56,8 +56,8 @@ type HeaderData struct { AuthToken string } -// StaffDevicePermissions ... -type StaffDevicePermissions struct { +// StaffPermissions ... +type StaffPermissions struct { ID string `db:"id"` Name string `db:"name"` Permissions []string `db:"permissions"`