Skip to content

Commit 5c7ad1b

Browse files
author
=
committed
clean
1 parent 2b1d192 commit 5c7ad1b

File tree

4 files changed

+11
-44
lines changed

4 files changed

+11
-44
lines changed

assets/js/app.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11

2-
console.log('test vendredi');
3-
4-
52
let bdbnavHeight;
63
let maxcarouselItemHeight = 512;
7-
let coefficient = 0.7;
8-
// let maxcarouselItemHeight = 600;
4+
//ratio hauteur/largeur
5+
let coefficient = 0.6;
96

107
function initTop(){
11-
console.log('initTop');
8+
console.log('initTop2');
129
bdbnavHeight = document.getElementById('bdbnav').offsetHeight;
1310

1411
console.log( bdbnavHeight);
@@ -19,7 +16,6 @@ function initTop(){
1916
carouselItem.forEach(function(item) {
2017
if( window.innerWidth * coefficient < maxcarouselItemHeight){
2118
item.style.height = (window.innerWidth * coefficient)+'px';
22-
// item.style.height = '250px';
2319
}
2420
else{
2521
item.style.height = maxcarouselItemHeight+'px';
@@ -29,12 +25,12 @@ function initTop(){
2925
}
3026

3127
addEventListener('resize', (event) => {
28+
3229
initTop();
3330
});
3431

35-
3632
window.addEventListener('load', (event) => {
37-
console.log('DOM fully loaded and parsed hhhhnnn');
33+
console.log('DOM fully loaded and parsed');
3834
initTop();
3935
});
4036

src/Controller/BDboomController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function index(UserRepository $userRepository, BDboomRepository $BDboomRe
7878
public function listeResultat(UserRepository $userRepository, BDboomAPIsearchRepository $BDboomAPIsearchRepository, Request $request, AlbumRepository $albumRepository, BDboomRepository $BDboomRepository, CollectionnRepository $collectionnRepository, WishlistRepository $wishlistRepository): Response
7979
{
8080

81-
if(!empty( $this->session->get('listItemsAmazon', []) ) || !empty( $this->session->get('listItemsGGbook', []) ) ){
81+
if(!empty( $this->session->get('listItemsAmazon', []) ) || !empty( $this->session->get('listItemsGGbook', []) ) ){
8282

8383
//si on vient de ajouter a la collection depuis la page liste
8484
$listItemsBDboom = $this->session->get('listItemsBDboom', []);

src/Repository/BDboomAPIsearchRepository.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ public function DetailAmazonProduct($itemIds)
311311
echo "Error Message: ", $exception->getMessage(), PHP_EOL;
312312
}
313313

314-
dd('coucou');
315-
316314
return $url;
317315
}
318316

@@ -417,8 +415,5 @@ public function APIcleanGoogle($listItemsGGbookBrut)
417415

418416

419417

420-
// public function scrappThis($url)
421-
// {
422-
// return $url;
423-
// }
418+
424419
}

src/Service/BDboomService.php

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,13 @@ public function __construct( AlbumRepository $albumRepository, AlbumCollectionRe
2929
$this->albumRepository = $albumRepository;
3030
$this->BDboomRepository = $BDboomRepository;
3131
$this->collectionnRepository = $collectionnRepository;
32-
$this->wishlistRepository = $wishlistRepository;
33-
34-
32+
$this->wishlistRepository = $wishlistRepository;
3533
}
3634

3735

3836

3937
public function searchInBDboom($arrayBookInfo)
40-
{
41-
38+
{
4239
//on verifie si le livre n'est pas deja en BDD
4340
//recherche par isbn et titre (isbn different de no isbn)
4441

@@ -72,7 +69,7 @@ public function saveInBDboom($arrayBookInfo, $bdsearch, $addFrom)
7269
$album->setBDboomDate($Now);
7370
$album->setOrigine( $addFrom );
7471

75-
//on enregistre cette nouvelle istance en BDD
72+
//on enregistre cette nouvelle instance en BDD
7673
$this->albumRepository->save($album, true);
7774

7875
//recuperer l'id du nouveau livre
@@ -139,23 +136,14 @@ public function suppAnIdBookToAnIdWishlist($wishlistIdSelected, $albumID)
139136

140137
public function mailJetSend01($token, $user)
141138
{
142-
143-
// require 'vendor/autoload.php';
144-
// dd($token, $user,$user->getEmail() );
145-
146139
// Use your saved credentials, specify that you are using Send API v3.1
147140
# Please add your access key here cle renseignées dans .env et config/service.yaml
148141
$MJ_APIKEY_PUBLIC = $this->getParameter('app.mailJetkey');
149142

150143
# Please add your secret key here
151144
$MJ_APIKEY_PRIVATE = $this->getParameter('app.mailJetsecretkey');
152145

153-
154146
$mj = new \Mailjet\Client($MJ_APIKEY_PUBLIC, $MJ_APIKEY_PRIVATE,true,['version' => 'v3.1']);
155-
// dd($mj);
156-
// Define your request body
157-
158-
159147

160148
$body = [
161149
'Messages' => [
@@ -184,20 +172,8 @@ public function mailJetSend01($token, $user)
184172
]
185173

186174
];
187-
188-
// 'TextPart' => "Bienvenu sur BDboom",
189-
// 'HTMLPart' => "<h3>Bonjour, Bienvenu sur BDboom,</h3><br />
190-
// Pour complètement valider votre compte merci de cliquer sur le lien suivant:<br />
191-
// <a href=\"http://bdboom.test/confirmationInscription?token=".$token."\">Confirmez votre compte</a>!
192-
// <br />
193-
// ",
194-
// <a href=\"' . $this->generateUrl('app_BDboom_confirmationInscription', ['token' => $user->getToken()], UrlGeneratorInterface::ABSOLUTE_URL) . '\">Activer mon compte</a>
195-
// All resources are located in the Resources class
196-
175+
197176
$response = $mj->post(Resources::$Email, ['body' => $body]);
198-
// dd($response);
199-
// Read the response
200-
201177
$response->success() && var_dump($response->getData());
202178
}
203179

0 commit comments

Comments
 (0)