From 50bbf743d401864f73b72adbb759e3cd5c42190b Mon Sep 17 00:00:00 2001 From: Alexander Blanchard Date: Thu, 24 Oct 2024 10:12:17 +0100 Subject: [PATCH] refactor: Remove changes to reward object --- code/web/sys/Community/Reward.php | 13 +------------ .../DBMaintenance/community_engagement_updates.php | 3 +-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/code/web/sys/Community/Reward.php b/code/web/sys/Community/Reward.php index 7ca07e113a..02530d61f6 100644 --- a/code/web/sys/Community/Reward.php +++ b/code/web/sys/Community/Reward.php @@ -6,10 +6,8 @@ class Reward extends DataObject { public $name; public $description; public $rewardType; - public $badgeImage; public static function getObjectStructure($context = ''):array { - global $serverName; $rewardType = self::getRewardType(); return [ 'id' => [ @@ -40,13 +38,6 @@ public static function getObjectStructure($context = ''):array { 'description' => 'The type of reward', 'values' => $rewardType, ], - 'badgeImage' => [ - 'property' => 'badgeImage', - 'type' => 'image', - 'label' => 'Badge Image', - 'path' => '/data/aspen-discovery/' . $serverName . '/uploads/reward_images', - 'displayUrl' => '/Community/ViewImage?id=', - ], ]; } @@ -72,7 +63,5 @@ public static function getRewardList(): array { return $rewardList; } - // private function generateImage() { - // if(!empty($this->)) - // } + } \ No newline at end of file diff --git a/code/web/sys/DBMaintenance/community_engagement_updates.php b/code/web/sys/DBMaintenance/community_engagement_updates.php index c91a21e295..eaafe90833 100644 --- a/code/web/sys/DBMaintenance/community_engagement_updates.php +++ b/code/web/sys/DBMaintenance/community_engagement_updates.php @@ -49,8 +49,7 @@ function getCommunityEngagementUpdates() { id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100) NOT NULL, description VARCHAR(255), - rewardType INT(11) DEFAULT -1, - badgeImage VARCHAR(512) NOT NULL + rewardType INT(11) DEFAULT -1 )ENGINE = InnoDB", ], ],