Skip to content

Commit

Permalink
rename QuestionController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pnal committed Oct 13, 2020
1 parent d874013 commit ed40ab9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ APP_SECRET=bfdbf7b5a52e7fbe73257dc104554eb0
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^(localhost|example\.com)$'
###< symfony/framework-bundle ###

DATA_PATH=var/data/questions
4 changes: 2 additions & 2 deletions config/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
api_question_post:
path: /question
controller: App\Controller\QuestionController::postQuestion
controller: App\Controller\QuestionsController::postQuestion
methods: POST

api_questions_get:
path: /questions
controller: App\Controller\QuestionController::getQuestions
controller: App\Controller\QuestionsController::getQuestions
methods: GET
2 changes: 1 addition & 1 deletion config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:

App\Storage\FileStorage:
arguments:
$dataDirPath: '%kernel.project_dir%/var/data/questions'
$dataDirPath: '%kernel.project_dir%/%env(DATA_PATH)%'

App\Service\Translator\AdapterInterface:
class: App\Service\Translator\Adapter\GoogleTranslatorAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class QuestionController extends AbstractController
class QuestionsController extends AbstractController
{
public function postQuestion (Request $request, QuestionApiServiceInterface $questionApiService) {
$request = $this->convertRequest($request);
Expand Down

0 comments on commit ed40ab9

Please sign in to comment.