Skip to content

Commit 930557a

Browse files
authored
Merge pull request #309 from IFRCGo/bugfix/WN-321
Bugfix/wn 321
2 parents b42d566 + c0c4a4c commit 930557a

16 files changed

Lines changed: 2 additions & 786 deletions

File tree

app/Classes/Renderer/Entities/SnappyImageClient.php

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/Classes/Renderer/Services/ImageService.php

Lines changed: 0 additions & 88 deletions
This file was deleted.

app/Classes/Renderer/Services/ImageServiceException.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

app/Http/Controllers/WhatNow/InstructionController.php

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
use App\Classes\RcnApi\Exceptions\RcnApiResourceNotFoundException;
1010
use App\Classes\RcnApi\RcnApiClient;
1111
use App\Classes\RcnApi\Resources\WhatNowResource;
12-
use App\Classes\Renderer\Entities\ImageFile;
13-
use App\Classes\Renderer\Services\ImageService;
14-
use App\Classes\Renderer\Services\ImageServiceException;
1512
use App\Events\WhatNow\InstructionCreated;
1613
use App\Events\WhatNow\InstructionDeleted;
1714
use App\Events\WhatNow\InstructionTranslationCreated;
@@ -36,13 +33,9 @@ final class InstructionController extends ApiController
3633
private $client;
3734

3835

39-
private $image;
40-
41-
42-
public function __construct(RcnApiClient $client, ImageService $image)
36+
public function __construct(RcnApiClient $client)
4337
{
4438
$this->client = $client->whatnow();
45-
$this->image = $image;
4639
}
4740

4841

@@ -768,24 +761,4 @@ public function publishTranslations($countryCode, Request $request)
768761
}
769762
}
770763

771-
public function renderImage(Request $request, $instructionId, $translationCode, $stageRef)
772-
{
773-
try {
774-
$revision = $request->query('revision') == 'true';
775-
$image = $this->image->createFromArray([
776-
'instructionId' => $instructionId,
777-
'translationCode' => $translationCode,
778-
'stageRef' => $stageRef,
779-
'revision' => $revision
780-
]);
781-
} catch (ImageServiceException $e) {
782-
return $this->respondWithNotFound($e, $e->getMessage());
783-
}
784-
785-
$filename = $instructionId . '_' . $translationCode . '_' . $stageRef . '.jpg';
786-
$imageFile = new ImageFile(config('whatnowimage.directory'), $filename);
787-
$path = $this->image->render($image, $imageFile);
788-
789-
return response()->file($path);
790-
}
791764
}

app/Providers/ImageClientServiceProvider.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

composer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,16 @@
66
"type": "project",
77
"require": {
88
"php": ">=7.0.0",
9-
"aws/aws-sdk-php": "^3.216",
109
"darkaonline/l5-swagger": "5.8",
1110
"fideloper/proxy": "~4.0",
1211
"guzzlehttp/guzzle": "~6.0",
1312
"guzzlehttp/promises": "^1.4.0",
1413
"guzzlehttp/psr7": "^1.7.0",
15-
"knplabs/knp-snappy-bundle": "^1.6",
1614
"laravel/framework": "5.8.*",
1715
"laravel/socialite": "^3.0",
1816
"laravel/tinker": "~1.0",
1917
"league/csv": "^9.8",
2018
"maatwebsite/excel": "3.1",
21-
"silvertipsoftware/wkhtmltoimage-amd64": "0.12.5",
2219
"spatie/laravel-cors": "^1.0",
2320
"symfony/polyfill-mbstring": "^1.17",
2421
"tymon/jwt-auth": "^1.0.0-rc.1"

config/app.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090

9191

9292
App\Classes\RcnApi\RcnApiServiceProvider::class,
93-
App\Providers\ImageClientServiceProvider::class,
9493
],
9594

9695

config/filesystems.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99

1010

11-
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
1211

1312

1413

@@ -26,13 +25,6 @@
2625
'visibility' => 'public',
2726
],
2827

29-
's3' => [
30-
'driver' => 's3',
31-
'key' => env('AWS_KEY'),
32-
'secret' => env('AWS_SECRET'),
33-
'subnationals' => env('AWS_REGION'),
34-
'bucket' => env('AWS_BUCKET'),
35-
],
3628

3729
],
3830

config/queue.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@
2828
'retry_after' => 90,
2929
],
3030

31-
'sqs' => [
32-
'driver' => 'sqs',
33-
'key' => 'your-public-key',
34-
'secret' => 'your-secret-key',
35-
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
36-
'queue' => 'your-queue-name',
37-
'subnationals' => 'us-east-1',
38-
],
3931

4032
'redis' => [
4133
'driver' => 'redis',

config/services.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,6 @@
44

55

66

7-
'mailgun' => [
8-
'domain' => env('MAILGUN_DOMAIN'),
9-
'secret' => env('MAILGUN_SECRET'),
10-
],
11-
12-
'ses' => [
13-
'key' => env('SES_KEY'),
14-
'secret' => env('SES_SECRET'),
15-
'subnationals' => env('SES_REGION','us-west-1')
16-
],
17-
18-
'sparkpost' => [
19-
'secret' => env('SPARKPOST_SECRET'),
20-
],
21-
22-
'stripe' => [
23-
'model' => \App\Models\Access\User\User::class,
24-
'key' => env('STRIPE_KEY'),
25-
'secret' => env('STRIPE_SECRET'),
26-
],
277

288
'github' => [
299
'client_id' => env('GITHUB_CLIENT_ID'),

0 commit comments

Comments
 (0)