Skip to content

Commit 2a4f0f3

Browse files
wbloszykjordisala1991
authored andcommitted
Fix RestFul API
1 parent ceae24b commit 2a4f0f3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Resources/config/api_controllers.xml

+4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@
55
<argument type="service" id="sonata.classification.manager.category"/>
66
<argument type="service" id="form.factory"/>
77
</service>
8+
<service id="Sonata\ClassificationBundle\Controller\Api\CategoryController" alias="sonata.classification.controller.api.category" public="true"/>
89
<service id="sonata.classification.controller.api.collection" class="Sonata\ClassificationBundle\Controller\Api\CollectionController">
910
<argument type="service" id="sonata.classification.manager.collection"/>
1011
<argument type="service" id="form.factory"/>
1112
</service>
13+
<service id="Sonata\ClassificationBundle\Controller\Api\CollectionController" alias="sonata.classification.controller.api.collection" public="true"/>
1214
<service id="sonata.classification.controller.api.tag" class="Sonata\ClassificationBundle\Controller\Api\TagController">
1315
<argument type="service" id="sonata.classification.manager.tag"/>
1416
<argument type="service" id="form.factory"/>
1517
</service>
18+
<service id="Sonata\ClassificationBundle\Controller\Api\TagController" alias="sonata.classification.controller.api.tag" public="true"/>
1619
<service id="sonata.classification.controller.api.context" class="Sonata\ClassificationBundle\Controller\Api\ContextController">
1720
<argument type="service" id="sonata.classification.manager.context"/>
1821
<argument type="service" id="form.factory"/>
1922
</service>
23+
<service id="Sonata\ClassificationBundle\Controller\Api\ContextController" alias="sonata.classification.controller.api.context" public="true"/>
2024
</services>
2125
</container>

src/Resources/config/routing/api.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<routes xmlns="http://friendsofsymfony.github.com/schema/rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://friendsofsymfony.github.com/schema/rest https://raw.githubusercontent.com/FriendsOfSymfony/FOSRestBundle/master/Resources/config/schema/routing/rest_routing-1.0.xsd">
3-
<import type="rest" resource="sonata.classification.controller.api.category" name-prefix="sonata_api_classification_category_"/>
4-
<import type="rest" resource="sonata.classification.controller.api.collection" name-prefix="sonata_api_classification_collection_"/>
5-
<import type="rest" resource="sonata.classification.controller.api.tag" name-prefix="sonata_api_classification_tag_"/>
6-
<import type="rest" resource="sonata.classification.controller.api.context" name-prefix="sonata_api_classification_context_"/>
3+
<import type="rest" resource="Sonata\ClassificationBundle\Controller\Api\CategoryController" name-prefix="sonata_api_classification_category_"/>
4+
<import type="rest" resource="Sonata\ClassificationBundle\Controller\Api\CollectionController" name-prefix="sonata_api_classification_collection_"/>
5+
<import type="rest" resource="Sonata\ClassificationBundle\Controller\Api\TagController" name-prefix="sonata_api_classification_tag_"/>
6+
<import type="rest" resource="Sonata\ClassificationBundle\Controller\Api\ContextController" name-prefix="sonata_api_classification_context_"/>
77
</routes>

0 commit comments

Comments
 (0)