Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
labelabeille
server
Commits
2972d1fb
Commit
2972d1fb
authored
May 07, 2016
by
wilhelmhb
Browse files
débuggage des ajouts de note à une ruche
parent
0697d192
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/ApiBundle/Controller/PsBoxRestController.php
View file @
2972d1fb
...
...
@@ -347,7 +347,7 @@ class PsBoxRestController extends FOSRestController
curl_close($ch);
$resultat = json_decode(utf8_encode($resultat), true);
return $resultat;*/
return
true
;
return
$box
;
}
/**
...
...
src/ApiBundle/Controller/PsCustomNoteCustomerRestController.php
View file @
2972d1fb
...
...
@@ -16,6 +16,7 @@ use FOS\RestBundle\Controller\Annotations\Patch;
use
Symfony\Bundle\FrameworkBundle\Controller\Controller
;
use
Symfony\Component\Form\FormTypeInterface
;
use
Symfony\Component\HttpFoundation\JsonResponse
;
use
ApiBundle\Form\PsCustomNoteCustomerType
;
use
ApiBundle\Entity\CommonInterface
;
...
...
@@ -110,7 +111,7 @@ class PsCustomNoteCustomerRestController extends FOSRestController
$params
);
return
$
new
;
return
new
JsonResponse
(
$new
,
Codes
::
HTTP_CREATED
)
;
$routeOptions
=
array
(
'id'
=>
$new
->
getId
(),
'_format'
=>
$request
->
get
(
'_format'
)
...
...
src/ApiBundle/Controller/PsDefaultNoteCustomerRestController.php
View file @
2972d1fb
...
...
@@ -16,6 +16,7 @@ use FOS\RestBundle\Controller\Annotations\Patch;
use
Symfony\Bundle\FrameworkBundle\Controller\Controller
;
use
Symfony\Component\Form\FormTypeInterface
;
use
Symfony\Component\HttpFoundation\JsonResponse
;
use
ApiBundle\Form\PsDefaultNoteCustomerType
;
use
ApiBundle\Entity\CommonInterface
;
...
...
@@ -110,7 +111,7 @@ class PsDefaultNoteCustomerRestController extends FOSRestController
$params
);
return
$
new
;
return
new
JsonResponse
(
$new
,
Codes
::
HTTP_CREATED
)
;
$routeOptions
=
array
(
'id'
=>
$new
->
getId
(),
'_format'
=>
$request
->
get
(
'_format'
)
...
...
@@ -260,9 +261,9 @@ class PsDefaultNoteCustomerRestController extends FOSRestController
*
* @return array
*/
public
function
getHiveAction
(
$id
Hive
)
{
public
function
getHiveAction
(
$id
)
{
$this
->
forwardIfNotAuthenticated
();
return
$this
->
container
->
get
(
'
a
pi
.psd
efault
n
ote
c
ustomer
.handler
'
)
->
findByIdHive
(
$id
Hive
);
return
$this
->
getDoctrine
()
->
getManager
()
->
getRepository
(
'
A
pi
Bundle:PsD
efault
N
ote
C
ustomer'
)
->
findByIdHive
(
$id
);
}
}
?>
src/ApiBundle/Entity/Handler/PsCustomerHandler.php
View file @
2972d1fb
...
...
@@ -114,7 +114,7 @@ class PsCustomerHandler implements CommonHandlerInterface {
public
function
delete
(
PsCustomer
$pshive
)
{
$this
->
om
->
remove
(
$pshive
);
$this
->
om
->
flush
();
$this
->
om
->
flush
();
$response
=
new
JsonResponse
([
'success'
=>
true
],
301
);
$response
->
headers
->
set
(
'Content-Type'
,
'application/json'
);
return
$response
;
...
...
src/ApiBundle/Entity/PsCustomNoteCustomer.php
View file @
2972d1fb
...
...
@@ -98,7 +98,7 @@ class PsCustomNoteCustomer
*/
public
function
getIdHive
()
{
return
$this
->
idH
S
ive
;
return
$this
->
idHive
;
}
/**
...
...
src/ApiBundle/Entity/PsDefaultNoteCustomer.php
View file @
2972d1fb
...
...
@@ -45,7 +45,7 @@ class PsDefaultNoteCustomer
/**
* @var integer
*
* @ORM\Column(name="id
C
ustomer", type="integer")
* @ORM\Column(name="id
_c
ustomer", type="integer")
*/
private
$idCustomer
;
...
...
src/ApiBundle/Form/PsCustomNoteCustomerType.php
View file @
2972d1fb
...
...
@@ -15,9 +15,9 @@ class PsCustomNoteCustomerType extends AbstractType
public
function
buildForm
(
FormBuilderInterface
$builder
,
array
$options
)
{
$builder
->
add
(
'id
_c
ustom
_n
ote'
)
->
add
(
'id
_h
ive'
)
->
add
(
'date
_a
dd'
)
->
add
(
'id
C
ustom
N
ote'
)
->
add
(
'id
H
ive'
)
->
add
(
'date
A
dd'
)
;
}
...
...
src/ApiBundle/Form/PsDefaultNoteCustomerType.php
View file @
2972d1fb
...
...
@@ -15,10 +15,10 @@ class PsDefaultNoteCustomerType extends AbstractType
public
function
buildForm
(
FormBuilderInterface
$builder
,
array
$options
)
{
$builder
->
add
(
'id
_d
efault
_n
ote'
)
->
add
(
'id
_h
ive'
)
->
add
(
'id
_c
ustomer'
)
->
add
(
'date
_a
dd'
)
->
add
(
'id
D
efault
N
ote'
)
->
add
(
'id
H
ive'
)
->
add
(
'id
C
ustomer'
)
->
add
(
'date
A
dd'
)
;
}
...
...
Write
Preview
Supports
Markdown
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