Skip to content

Commit

Permalink
Merge pull request #155 from Capstone-Projects-2024-Spring/troublesho…
Browse files Browse the repository at this point in the history
…ot-show

json encode stuff
  • Loading branch information
AndrewDKahn committed May 6, 2024
2 parents f299109 + c347448 commit fe0b0a2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions colorInSync/app/Http/Controllers/DocumentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ public function show(Request $request, string $id)
if (!$document) {
return response()->json(['error' => 'Document not found'], 404);
}
Log::debug($document->toJson());
Log::debug($document->toJson()->content);
$text = $document->toJson()->content;

$text = $document->content;


#$text = "Nevertheless, the angelic being persevered.";

Expand Down Expand Up @@ -147,12 +147,12 @@ public function show(Request $request, string $id)
"exceptions-color map": {"angelic": "rgb(250,250,250)", "Monday": "rgb(0,0,0)"}
}';

#$object = new \stdClass();
#$object->colorProfile = $colorProfile;
#$object->text = $text;
#$requestBody = json_encode($object);
$object = new \stdClass();
$object->{'color-profile'} = $colorProfile;
$object->text = $text;
$requestBody = json_encode($object);

$requestBody = '{' . $colorProfile . ', "text": "' . $text . '"}';
#$requestBody = '{' . $colorProfile . ', "text": "' . $text . '"}';



Expand Down

0 comments on commit fe0b0a2

Please sign in to comment.