Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
technobel.sf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mathieu
technobel.sf
Commits
45c6aa7a
Commit
45c6aa7a
authored
Jul 09, 2018
by
Mat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vérification d'une première route de l'API/v2 en GET avec postman
parent
c964e7da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
20 deletions
+25
-20
app/config/config.yml
app/config/config.yml
+2
-2
app/config/security.yml
app/config/security.yml
+1
-1
src/Api2Bundle/Controller/DefaultController.php
src/Api2Bundle/Controller/DefaultController.php
+0
-17
src/Api2Bundle/Controller/MessageController.php
src/Api2Bundle/Controller/MessageController.php
+22
-0
No files found.
app/config/config.yml
View file @
45c6aa7a
...
...
@@ -103,7 +103,7 @@ lexik_jwt_authentication:
# Nelmio CORS
nelmio_cors
:
paths
:
'
^/
api
/'
:
'
^/
API
/'
:
allow_origin
:
[
'
*'
]
allow_headers
:
[
'
X-Custom-Auth'
]
allow_methods
:
[
'
POST'
,
'
PUT'
,
'
GET'
,
'
DELETE'
,
'
PATCH'
]
...
...
@@ -121,7 +121,7 @@ fos_rest:
enabled
:
true
format_listener
:
rules
:
path
:
^/
api
path
:
^/
API
priorities
:
[
json
]
fallback_format
:
'
json'
view
:
...
...
app/config/security.yml
View file @
45c6aa7a
...
...
@@ -29,7 +29,7 @@ security:
security
:
false
main
:
pattern
:
^/
anonymous
:
fals
e
anonymous
:
tru
e
# un anonyme n'aura accès qu'aux pages login et register
form_login
:
login_path
:
login
...
...
src/Api2Bundle/Controller/DefaultController.php
deleted
100755 → 0
View file @
c964e7da
<?php
namespace
Api2Bundle\Controller
;
use
Symfony\Bundle\FrameworkBundle\Controller\Controller
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
class
DefaultController
extends
Controller
{
/**
* @Route("/")
*/
public
function
indexAction
()
{
return
$this
->
render
(
'Api2Bundle:Default:index.html.twig'
);
}
}
src/Api2Bundle/Controller/MessageController.php
0 → 100755
View file @
45c6aa7a
<?php
namespace
Api2Bundle\Controller
;
use
FOS\RestBundle\Controller\Annotations
as
Rest
;
use
FOS\RestBundle\Controller\FOSRestController
;
use
SocketBundle\Entity\Message
;
class
MessageController
extends
FOSRestController
{
/**
* @Rest\Get("/message")
* @Rest\View()
*/
public
function
getAction
()
{
return
$this
->
getDoctrine
()
->
getRepository
(
Message
::
class
)
->
findAll
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment