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
P
potage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
potage
Commits
3c9f0a3a
Commit
3c9f0a3a
authored
Sep 07, 2018
by
Mat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[non testé] groupes de serialization
parent
956007af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/APIBundle/Controller/LegumeAPIController.php
src/APIBundle/Controller/LegumeAPIController.php
+1
-1
src/APIBundle/Controller/OffreAPIController.php
src/APIBundle/Controller/OffreAPIController.php
+4
-4
No files found.
src/APIBundle/Controller/LegumeAPIController.php
View file @
3c9f0a3a
...
...
@@ -246,7 +246,7 @@ class LegumeAPIController extends MasterAPIController
{
$em
->
persist
(
$offrelegumes
);
$em
->
flush
();
return
$this
->
api
(
$offrelegumes
);
return
$this
->
api
(
$offrelegumes
,
200
,
array
(
'readOffreLegumes'
)
);
}
return
$this
->
api
(
$form
,
Response
::
HTTP_BAD_REQUEST
);
}
...
...
src/APIBundle/Controller/OffreAPIController.php
View file @
3c9f0a3a
...
...
@@ -58,7 +58,7 @@ class OffreAPIController extends MasterAPIController
$em
=
$this
->
getDoctrine
()
->
getManager
();
$em
->
persist
(
$offre
);
$em
->
flush
();
// TODO bug -> Notice: Array to string conversion
return
$this
->
api
(
$offre
);
return
$this
->
api
(
$offre
,
200
,
array
(
'readOffres'
)
);
}
return
$this
->
api
(
$form
,
Response
::
HTTP_BAD_REQUEST
);
}
...
...
@@ -89,7 +89,7 @@ class OffreAPIController extends MasterAPIController
if
(
$offre
===
null
)
{
return
$this
->
api
(
'Not found'
,
Response
::
HTTP_NOT_FOUND
);
}
return
$this
->
api
(
$offre
);
return
$this
->
api
(
$offre
,
200
,
array
(
'readOffres'
)
);
}
...
...
@@ -114,7 +114,7 @@ class OffreAPIController extends MasterAPIController
if
(
$form
->
isSubmitted
()
&&
$form
->
isValid
())
{
$em
->
flush
();
return
$this
->
api
(
$offre
);
return
$this
->
api
(
$offre
,
200
,
array
(
'readOffres'
)
);
}
return
$this
->
api
(
$form
,
Response
::
HTTP_BAD_REQUEST
);
}
...
...
@@ -141,7 +141,7 @@ class OffreAPIController extends MasterAPIController
if
(
$form
->
isSubmitted
()
&&
$form
->
isValid
())
{
$em
->
flush
();
return
$this
->
api
(
$offre
);
return
$this
->
api
(
$offre
,
200
,
array
(
'readOffres'
)
);
}
return
$this
->
api
(
$form
,
Response
::
HTTP_BAD_REQUEST
);
}
...
...
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