Skip to content

Commit 0dae22b

Browse files
Merge pull request #227 from czqoocavatsim/dev
quotes fix
2 parents cb0616e + a03517c commit 0dae22b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
PASSWORD: ${{ secrets.PASS }}
2020
PORT: 22
2121
source: ./
22-
target: /var/www/czqo-web-prod/
22+
target: /var/www/czqoprod/
2323

2424
- name: Set permissions
2525
uses: appleboy/ssh-action@master
@@ -29,7 +29,7 @@ jobs:
2929
PASSWORD: ${{ secrets.PASS }}
3030
PORT: 22
3131
script: |
32-
cd /var/www/czqo-web-prod/
32+
cd /var/www/czqoprod/
3333
chown -R mufassil:www-data .
3434
find . -type f -exec chmod 664 {} \;
3535
find . -type d -exec chmod 775 {} \;

app/Http/Controllers/PrimaryViewsController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public function dashboard(Request $request)
7777
$quote = Cache::remember('quoteoftheday', 86400, function () {
7878
$client = new Client();
7979
$headers = [
80-
'Authorization' => 'Bearer '.env('QUOTES_API_TOKEN')
80+
'X-Api-Key' => env('QUOTES_API_TOKEN')
8181
];
82-
$output = $client->get('https://quotes.rest/qod',[
82+
$output = $client->get('https://api.api-ninjas.com/v1/quotes',[
8383
'headers' => $headers
8484
]);
8585

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"license": "MIT",
99
"type": "project",
1010
"require": {
11-
"php": "^8.2",
11+
"php": "^8.1",
1212
"barryvdh/laravel-dompdf": "^2.0",
1313
"bugsnag/bugsnag-laravel": "^2.0",
1414
"erusev/parsedown": "^1.7",

resources/views/my/index.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function randomArrayVar($array)
3737
{{auth()->user()->fullName('F')}}!
3838
</h1>
3939
@if(isset($quote))
40-
<p style="font-size: 1.2em;">{{$quote->contents->quotes[0]->quote}} ~ {{$quote->contents->quotes[0]->author}}</p>
40+
<p style="font-size: 1.2em;">{{$quote[0]->quote}} ~ {{$quote[0]->author}}</p>
4141
@endif
4242
</div>
4343
</div>

0 commit comments

Comments
 (0)