Skip to content

Commit

Permalink
Bug(Prompts): Image hash not saving
Browse files Browse the repository at this point in the history
  • Loading branch information
AW0005 committed Feb 6, 2024
1 parent e597eed commit 40bc586
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Services/PromptService.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function createPrompt($data, $user) {
$data['hide_submissions'] = 0;
}

$prompt = Prompt::create(Arr::only($data, ['prompt_category_id', 'name', 'summary', 'description', 'parsed_description', 'is_active', 'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'has_image', 'prefix', 'hide_submissions', 'staff_only']));
$prompt = Prompt::create(Arr::only($data, ['prompt_category_id', 'name', 'summary', 'description', 'parsed_description', 'is_active', 'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'has_image', 'prefix', 'hide_submissions', 'staff_only', 'hash']));

if ($image) {
$this->handleImage($image, $prompt->imagePath, $prompt->imageFileName);
Expand Down Expand Up @@ -260,7 +260,7 @@ public function updatePrompt($prompt, $data, $user) {
$data['hide_submissions'] = 0;
}

$prompt->update(Arr::only($data, ['prompt_category_id', 'name', 'summary', 'description', 'parsed_description', 'is_active', 'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'has_image', 'prefix', 'hide_submissions', 'staff_only']));
$prompt->update(Arr::only($data, ['prompt_category_id', 'name', 'summary', 'description', 'parsed_description', 'is_active', 'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'has_image', 'prefix', 'hide_submissions', 'staff_only', 'hash']));

if ($prompt) {
$this->handleImage($image, $prompt->imagePath, $prompt->imageFileName);
Expand Down

0 comments on commit 40bc586

Please sign in to comment.