@@ -106,11 +106,11 @@ |
||
106 | 106 | $user->updatetime = date('Y-m-d G:i:s'); |
107 | 107 | $id = R::store($user); |
108 | 108 | $res = (object)["id" => $id]; |
109 | - }catch (Exception $e) { |
|
109 | + } catch (Exception $e) { |
|
110 | 110 | echo $e; |
111 | 111 | } |
112 | 112 | |
113 | - }else { |
|
113 | + } else { |
|
114 | 114 | |
115 | 115 | } |
116 | 116 |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $headers = []; |
278 | 278 | $response = JsonResponse::create(["id"=>$wp_id], 200, $headers)->setSharedMaxAge(300); |
279 | 279 | |
280 | - }else { |
|
280 | + } else { |
|
281 | 281 | $headers = []; |
282 | 282 | $response = JsonResponse::create(["message"=>"Key no more valid"], 498, $headers)->setSharedMaxAge(300); |
283 | 283 | } |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | if ($b->completed === True) { |
483 | 483 | echo "CASO 1;<BR />"; |
484 | 484 | return $this->POINT_FOR_USING_A_CONQUERED_BADGE; |
485 | - }else { |
|
485 | + } else { |
|
486 | 486 | echo "CASO 2;<BR />"; |
487 | 487 | return $this->POINT_FOR_USING_A_BADGE; |
488 | 488 | } |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | "clientId"=>$user->id |
54 | 54 | ]; |
55 | 55 | $response = JsonResponse::create($res, 200, $headers)->setSharedMaxAge(300); |
56 | - }else { |
|
56 | + } else { |
|
57 | 57 | $headers = []; |
58 | 58 | $res = [ |
59 | 59 | "errore"=>"sbagliato password o user" //TODO roba |
60 | 60 | ]; |
61 | 61 | $response = JsonResponse::create($res, 401, $headers)->setSharedMaxAge(300); |
62 | 62 | } |
63 | - }else { |
|
63 | + } else { |
|
64 | 64 | //Facebook Redirect |
65 | 65 | } |
66 | 66 | return $response; // JsonResponse::create($output, 200, $headers)->setSharedMaxAge(300); |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | if (!$bean->id) { |
82 | 82 | //TODO mettere un controllo agli IP che forzano le richieste di token falsi |
83 | 83 | $response = "<html><head></head><body>Token non esistente!</body></html>"; |
84 | - }else { |
|
84 | + } else { |
|
85 | 85 | if (strtotime($verify->inserttime) < strtotime("-15 minutes")) { |
86 | 86 | $user = R::load('user', $verify->user); |
87 | 87 | $user->status = "enabled"; |
88 | 88 | $user->updatetime = date('Y-m-d H:i:s'); |
89 | 89 | $id = R::store($user); |
90 | 90 | $response = "<html><head></head><body>Account attivato complimenti!</body></html>"; |
91 | - }else { |
|
91 | + } else { |
|
92 | 92 | $response = "<html><head></head><body>Impossibile attivare account inserire mail e password per richiedere un nuovo token!</body></html>"; |
93 | 93 | } |
94 | 94 | } |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | $client = $this->createClient(); |
21 | 21 | $client = $this->logIn2($client); |
22 | 22 | $client->request( |
23 | - 'POST', |
|
24 | - '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
|
25 | - [], |
|
26 | - [], |
|
27 | - ['CONTENT_TYPE' => 'application/json'], |
|
28 | - ''); |
|
23 | + 'POST', |
|
24 | + '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
|
25 | + [], |
|
26 | + [], |
|
27 | + ['CONTENT_TYPE' => 'application/json'], |
|
28 | + ''); |
|
29 | 29 | $response = $client->getResponse(); |
30 | 30 | $data = $client->getResponse()->getContent(); |
31 | 31 | print_r("ROBAGROSSA"); |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | $client = $this->createClient(); |
49 | 49 | $client = $this->logIn2($client); |
50 | 50 | $client->request( |
51 | - 'DELETE', |
|
52 | - '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
|
53 | - [], |
|
54 | - [], |
|
55 | - ['CONTENT_TYPE' => 'application/json'], |
|
56 | - ''); |
|
51 | + 'DELETE', |
|
52 | + '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
|
53 | + [], |
|
54 | + [], |
|
55 | + ['CONTENT_TYPE' => 'application/json'], |
|
56 | + ''); |
|
57 | 57 | $response = $client->getResponse(); |
58 | 58 | |
59 | 59 |