Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenbm committed Apr 8, 2021
0 parents commit 2bc2bf0
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
28 changes: 28 additions & 0 deletions droppin/aheadworks-storelocator-api/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "droppin/aheadworks-storelocator-api",
"description": "Adds REST endpoints to Aheadworks StoreLoctaor",
"minimum-stability": "stable",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"authors": [
{
"name": "morten",
"email": "morten@droppinstudio.dk"
}
],
"require": {
"aheadworks/module-store-locator": ">1.*"
},
"type": "magento2-module",
"version": "1.0.0",
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Droppin\\Ahstorelocator\\": ""
}
}
}
8 changes: 8 additions & 0 deletions droppin/aheadworks-storelocator-api/etc/module.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Droppin_Ahstorelocator" setup_version="1.0.0">
<sequence>
<module name="Aheadworks_StoreLocator"/>
</sequence>
</module>
</config>
27 changes: 27 additions & 0 deletions droppin/aheadworks-storelocator-api/etc/webapi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" ?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
<route url="/V1/aheadworks-storelocator" method="POST">
<service class="Aheadworks\StoreLocator\Api\LocationRepositoryInterface" method="save"/>
<resources>
<resource ref="Aheadworks_StoreLocator::store_locator"/>
</resources>
</route>
<route url="/V1/aheadworks-storelocator/:locationId" method="PUT">
<service class="Aheadworks\StoreLocator\Api\LocationRepositoryInterface" method="save"/>
<resources>
<resource ref="Aheadworks_StoreLocator::store_locator"/>
</resources>
</route>
<route url="/V1/aheadworks-storelocator/:locationId" method="DELETE">
<service class="Aheadworks\StoreLocator\Api\LocationRepositoryInterface" method="deleteById"/>
<resources>
<resource ref="Aheadworks_StoreLocator::store_locator"/>
</resources>
</route>
<route url="/V1/aheadworks-storelocator/:locationId" method="GET">
<service class="Aheadworks\StoreLocator\Api\LocationRepositoryInterface" method="get"/>
<resources>
<resource ref="Aheadworks_StoreLocator::store_locator"/>
</resources>
</route>
</routes>
6 changes: 6 additions & 0 deletions droppin/aheadworks-storelocator-api/registration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Droppin_Ahstorelocator',
__DIR__
);

0 comments on commit 2bc2bf0

Please sign in to comment.