From e0c57c9521a68a5c6080c89aaa611dd8e9a2f325 Mon Sep 17 00:00:00 2001 From: Jonathan Veloso Date: Sun, 29 Jul 2018 23:01:53 -0300 Subject: [PATCH 1/8] =?UTF-8?q?teste=20te=C3=B3rico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- teorico.md | 67 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/teorico.md b/teorico.md index 8900235..020de7e 100644 --- a/teorico.md +++ b/teorico.md @@ -2,33 +2,44 @@ 1\) Qual a diferença do operador `==` para o operador `===` em JavaScript? -[Resposta] +O operador `==` não compara o tipo das variáveis envolvidas na operação, já o operador `===` considera o tipo para efetuar a comparação. 1.1) Dê 2 exemplos de quando os operadores produziriam resultados diferentes ```js -// Resposta +// a variável a possui valor 1 e tipo inteiro, já a variável b possui valor 1 e tipo string +let a = 1; +let b = '1'; +// o output da comparação abaixo será true, pois o operador == não considera o tipo. +console.log(a == b); +// o output da comparação abaixo será fase, pois o operador === considera o tipo. +console.log(a === b); +// o output da comparação abaixo será false, pois o operador != não considera o tipo. +console.log(a != b); +// o output da comparação abaixo será true, pois o operador !== considera o tipo. +console.log(a !== b); + ``` --- 2\) Qual recurso javascript é mais recomendado para tratar chamadas asíncronas? -[Resposta] +Promise 2.1) Justifique -[Resposta] +Além de ser uma forma organizada de fazer uma chamada assíncrona é um padrão que várias bibliotecas e recursos do javascript vem adotando. --- 3\) Existem threads em Node? -[Resposta] +Não 3.1) Explique -[Resposta] +O Node trabalha com single thread, porém utiliza de recursos assíncronos não bloqueantes para garantir performance. --- @@ -50,8 +61,22 @@ getUserByName('jonh doe') }) .then(user => console.log(user)) ``` +O resultado do codigo acima é undefined. Caso a intenção seja retornar a lista de telefones é necessário declarar 'return' antes da chamada do método getUserPhones, como no código a seguir: +```js +function getUserByName(name) { + return Promise.resolve({id: 1, name: name}) +} + +function getUserPhones(userId) { + return Promise.resolve(['(31) 90900800', '(31) 08009090']) +} -[Resposta] +getUserByName('jonh doe') + .then(user => { + return getUserPhones(user.id) + }) + .then(user => console.log(user)) +``` 4.2) ```js @@ -77,7 +102,7 @@ getData() ``` ``` -[Resposta] +O resultado do código acima é 'second', pois como o valor de id é undefined a função reject é executada ``` --- @@ -86,29 +111,39 @@ getData() 1\) Qual a diferença do operador `==` para o operador `===` em PHP? -[Resposta] +O operador `==` não compara o tipo das variáveis envolvidas na operação, já o operador `===` considera o tipo para efetuar a comparação. 1.1) Dê 2 exemplos de quando os operadores produziriam resultados diferentes ```php -// Resposta +// a seguir, a variável $a possui valor 1 de tipo inteiro e a variável $b com valor 1 de tipo string +$a = 1; +$b = '1'; +// a comparação a seguir não considera os tipos, $r terá valor true +$r = ($a == $b); +// a comparação a seguir considera os tipos, $r terá valor false +$r = ($a === $b); +// a comparação a seguir não considera os tipos, $r terá valor false +$r = ($a != $b); +// a comparação a seguir considera os tipos, $r terá valor true +$r = ($a !== $b); ``` --- 2\) Qual a função do apache ou nginx em uma aplicação PHP? -[Resposta] +A função é serem servidores web de aplicações escritas em PHP. --- 3\) Existem threads em PHP? -[Resposta] +Sim. 3.1) Explique -[Resposta] +Para trabalhar com Thread no PHP é necessario adicionar a biblioteca pthreads e estender a classe Thread nas classes em que quiser trabalhar com Thread. --- @@ -123,10 +158,10 @@ class Test { echo Test::prop; ``` -[Resposta] +O resultado é 1337 4.2) -```js +```php class A { public static function foo() { return 'bar'; @@ -146,4 +181,4 @@ class B extends A { B::test(); ``` -[Resposta] \ No newline at end of file +O resultado é 'bar' \ No newline at end of file From 7d01d3048152f3c7309ad46098355cbb89176ff4 Mon Sep 17 00:00:00 2001 From: Jonathan Veloso Date: Mon, 30 Jul 2018 01:46:03 -0300 Subject: [PATCH 2/8] =?UTF-8?q?teste=20pr=C3=A1tico=20-=20inicio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pratico.md | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/pratico.md b/pratico.md index bf801f2..44ca481 100644 --- a/pratico.md +++ b/pratico.md @@ -4,6 +4,20 @@ ```js // Resposta +class Array{ + constructor(array){ + this._array = array; + } + + last(){ + return this._array[this._array.length - 1]; + } +} + +let array1 = new Array([1,2,3,4,5,6,7,8,9]); +console.log(array1.last()) +let array2 = new Array([]); +console.log(array2.last()) // Teste/Exemplos @@ -26,22 +40,20 @@ function getTransactions() { result.json().then(transactions => { var _transactions = [] - for (var i in transactions) { - if (transactions[i].realizada) { - _transactions.push({ - id: transactions[i].id, - value: transactions[i].valor, - type: transactions[i].valor < 0 ? 'transference' : 'deposit', - }) + _transactions = transactions.filter(item => { + if(item.realizada){ + item.type = item.valor < 0 ? 'transference' : 'deposit'; + return item; } - } - + }) + resolve(_transactions) }) }) .catch(e => reject(e)) }) } +getTransactions().then(res => console.log(res)); ``` ```js From 4f87fb6394e00b13acfe907ac839364d03a3e9ed Mon Sep 17 00:00:00 2001 From: Jonathan Veloso Date: Mon, 30 Jul 2018 22:46:19 -0300 Subject: [PATCH 3/8] =?UTF-8?q?teste=20pr=C3=A1tico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node/.gitignore | 80 +++++++++++++++++++++++++++++++++++++++++++++++ node/index.js | 74 +++++++++++++++++++++++++++++++++++++++++++ node/package.json | 17 ++++++++++ node/service.js | 13 ++++++++ 4 files changed, 184 insertions(+) create mode 100644 node/.gitignore create mode 100644 node/package.json create mode 100644 node/service.js diff --git a/node/.gitignore b/node/.gitignore new file mode 100644 index 0000000..3b98d56 --- /dev/null +++ b/node/.gitignore @@ -0,0 +1,80 @@ + +# Created by https://www.gitignore.io/api/node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + + +# End of https://www.gitignore.io/api/node \ No newline at end of file diff --git a/node/index.js b/node/index.js index e69de29..cb251d8 100644 --- a/node/index.js +++ b/node/index.js @@ -0,0 +1,74 @@ +var express = require('express'); +var app = express(); +var bodyParser = require('body-parser'); +var cache = require('memory-cache'); + +app.use(function (req, res, next) { + res.header("Access-Control-Allow-Origin", "*"); + res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); + next(); +}); + +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: true })); + +var clients = require('restify-clients'); +var client = clients.createJsonClient({ + url: "https://olinda.bcb.gov.br" +}); + +app.get('/', function (req, res) { + res.send('hello world'); +}); + +app.get('/api/brl-usd', function (req, res) { + let cotacao = cache.get('cotacao'); + if(cotacao){ + res.send(cotacao); + }else{ + client.get(`/olinda/servico/PTAX/versao/v1/odata/CotacaoDolarDia(dataCotacao=@dataCotacao)?@dataCotacao='07-20-2018'&$top=100&$format=json`, (error, reqx, resx, retornox) => { + cache.put('cotacao',retornox, 14400000); + res.send(retornox); + }); + } +}); + +app.post('/api/orders', function (req, res) { + let items = req.body.items; + let total = 0.0; + + items.forEach(item=>{ + total += item; + }) + + let orders = cache.get('orders'); + let id = 1; + if(orders){ + id = orders[orders.length - 1].id + 1; + }else{ + console.log('nao tem') + orders = []; + } + + item = { + id: id, + createdAt: '30/07/2018', + totalBRL: total, + totalUSD: total * 3.73 + } + + orders.push(item); + cache.put('orders',orders); + res.send(item); +}); + +app.get('/api/orders', function (req, res) { + let orders = cache.get('orders'); + res.send(orders?orders:[]); +}); + +const porta = 3000; + +app.listen(3000, function () { + console.log(`Aplicação radando na porta ${porta}`); +}); \ No newline at end of file diff --git a/node/package.json b/node/package.json new file mode 100644 index 0000000..fc84cd2 --- /dev/null +++ b/node/package.json @@ -0,0 +1,17 @@ +{ + "name": "node", + "version": "1.0.0", + "description": "Teste Node Hot Milhas", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Jonathan Veloso", + "license": "ISC", + "dependencies": { + "express": "^4.16.3", + "memory-cache": "^0.2.0", + "restify": "^7.2.1", + "restify-clients": "^2.5.0" + } +} diff --git a/node/service.js b/node/service.js new file mode 100644 index 0000000..c41f3c2 --- /dev/null +++ b/node/service.js @@ -0,0 +1,13 @@ +module.exports = function () { + var clients = require('restify-clients'); + var client = clients.createJsonClient({ + url: "https://olinda.bcb.gov.br" + }); + + var requisicoes = {} + + requisicoes.cotacaoDolar = function(res, callback){ + client.get('/emitir-seguros/v0/additional-info/benefits', callback); + } + return requisicoes; +} \ No newline at end of file From 1c7446265f6cb9dbc9930ab5e2aa6a873c120ef2 Mon Sep 17 00:00:00 2001 From: Jonathan Veloso Date: Tue, 31 Jul 2018 00:07:21 -0300 Subject: [PATCH 4/8] =?UTF-8?q?teste=20pr=C3=A1tico=20-=20php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- php/oop/Estaciona.php | 16 ++++++++++++++++ php/oop/Estacionamento.php | 9 +++++++++ php/oop/Pagamento.php | 14 ++++++++++++++ php/oop/Vaga.php | 8 ++++++++ php/oop/Veiculo.php | 9 +++++++++ pratico.md | 23 +++++++++++++++++++++++ 6 files changed, 79 insertions(+) create mode 100644 php/oop/Estaciona.php create mode 100644 php/oop/Estacionamento.php create mode 100644 php/oop/Pagamento.php create mode 100644 php/oop/Vaga.php create mode 100644 php/oop/Veiculo.php diff --git a/php/oop/Estaciona.php b/php/oop/Estaciona.php new file mode 100644 index 0000000..29fc097 --- /dev/null +++ b/php/oop/Estaciona.php @@ -0,0 +1,16 @@ +veiculo = $veiculo; + $this->vaga = $vaga; + $this->dataHoraEntrada = date(); + } + } +} +?> \ No newline at end of file diff --git a/php/oop/Estacionamento.php b/php/oop/Estacionamento.php new file mode 100644 index 0000000..b9c7610 --- /dev/null +++ b/php/oop/Estacionamento.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/php/oop/Pagamento.php b/php/oop/Pagamento.php new file mode 100644 index 0000000..a0d50f7 --- /dev/null +++ b/php/oop/Pagamento.php @@ -0,0 +1,14 @@ +estaciona = $estaciona; + $this->dataHora = date(); + } + } +} +?> \ No newline at end of file diff --git a/php/oop/Vaga.php b/php/oop/Vaga.php new file mode 100644 index 0000000..8e8fdf2 --- /dev/null +++ b/php/oop/Vaga.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/php/oop/Veiculo.php b/php/oop/Veiculo.php new file mode 100644 index 0000000..74841e6 --- /dev/null +++ b/php/oop/Veiculo.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/pratico.md b/pratico.md index 44ca481..fb314e3 100644 --- a/pratico.md +++ b/pratico.md @@ -170,6 +170,29 @@ function login($username, $password) { ```php // Resposta +Class Login{ + private $mysqli; + + function __construct($config){ + $this->mysqli = mysqli_connect($config['host'],$config['user'],$config['pass'],$config['dbname']) or die(mysqli_error()); + } + + public function login($username, $password){ + $query = " SELECT username, password + FROM users + WHERE username = ? AND password = ?"; + $statement = $this->mysqli->prepare($query); + $statement->bind_param("ss", $username,$password); + try{ + $statement->execute(); + $users = $this->get_result($statement); + return $users[0]; + }catch(Exception $e){ + echo $e; + } + } +} + ``` --- From 52507dac66bc978bccd99e31978dbb9e722d1b0c Mon Sep 17 00:00:00 2001 From: Jonathan Veloso Date: Tue, 31 Jul 2018 00:25:14 -0300 Subject: [PATCH 5/8] =?UTF-8?q?teste=20pr=C3=A1tico=20-=20php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pratico.md | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/pratico.md b/pratico.md index fb314e3..cc4d6a5 100644 --- a/pratico.md +++ b/pratico.md @@ -170,27 +170,14 @@ function login($username, $password) { ```php // Resposta -Class Login{ - private $mysqli; - - function __construct($config){ - $this->mysqli = mysqli_connect($config['host'],$config['user'],$config['pass'],$config['dbname']) or die(mysqli_error()); - } - - public function login($username, $password){ - $query = " SELECT username, password - FROM users - WHERE username = ? AND password = ?"; - $statement = $this->mysqli->prepare($query); - $statement->bind_param("ss", $username,$password); - try{ - $statement->execute(); - $users = $this->get_result($statement); - return $users[0]; - }catch(Exception $e){ - echo $e; - } - } +function login($username, $password) { + $sql = "SELECT username, password + FROM users + WHERE username = :username AND password = :password"; + $pdo->prepare($sql) + $pdo->execute(array(':username' => $username, ':password' => $password)); + $users = $pdo->fetchAll(); + return $users[0]; } ``` From ae2e9f6f489e9fe6714ca7739311693dcb9af694 Mon Sep 17 00:00:00 2001 From: Jonathan Veloso Date: Tue, 31 Jul 2018 01:55:04 -0300 Subject: [PATCH 6/8] =?UTF-8?q?teste=20pr=C3=A1tico=20-=20php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- php/CurlClient.php | 26 ++++++++++++++++++++++++++ php/brl-usd.php | 15 +++++++++++++++ php/orders.php | 34 ++++++++++++++++++++++++++++++++++ pratico.md | 2 +- pull_request_template.md | 4 ++-- 5 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 php/CurlClient.php diff --git a/php/CurlClient.php b/php/CurlClient.php new file mode 100644 index 0000000..176705e --- /dev/null +++ b/php/CurlClient.php @@ -0,0 +1,26 @@ + "https://olinda.bcb.gov.br/olinda/servico/PTAX/versao/v1/odata/CotacaoDolarDia(dataCotacao=@dataCotacao)?@dataCotacao='07-20-2018'", + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => "", + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 30, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => "GET", + )); + $response = curl_exec($curl); + $err = curl_error($curl); + curl_close($curl); + if ($err) { + echo "cURL Error #:" . $err; + } else { + return $response; + } + } +} + +?> \ No newline at end of file diff --git a/php/brl-usd.php b/php/brl-usd.php index e69de29..0fcb91f 100644 --- a/php/brl-usd.php +++ b/php/brl-usd.php @@ -0,0 +1,15 @@ + diff --git a/php/orders.php b/php/orders.php index e69de29..dc3f218 100644 --- a/php/orders.php +++ b/php/orders.php @@ -0,0 +1,34 @@ +id = $id; + $this->created_at = date('d/m/Y'); + } + + public function addItems($items){ + foreach($items as $item){ + $this->total_brl += $item; + } + $this->total_usd = $this->total_brl * 3.78; + } +} + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $items = $_POST['items']; + $pedido = new Pedido(1); + $pedido->addItems($items); + echo json_encode((array)$pedido); +}else if($_SERVER['REQUEST_METHOD'] === 'GET'){ + $pedido = new Pedido(1); + $pedido->addItems([100,200,300]); + $pedido2 = new Pedido(2); + $pedido2->addItems([100,200,300]); + echo json_encode([$pedido, $pedido2]); +} + diff --git a/pratico.md b/pratico.md index cc4d6a5..45e2c9a 100644 --- a/pratico.md +++ b/pratico.md @@ -174,7 +174,7 @@ function login($username, $password) { $sql = "SELECT username, password FROM users WHERE username = :username AND password = :password"; - $pdo->prepare($sql) + $pdo->prepare($sql); $pdo->execute(array(':username' => $username, ':password' => $password)); $users = $pdo->fetchAll(); return $users[0]; diff --git a/pull_request_template.md b/pull_request_template.md index c09ac93..e0c383b 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,5 +1,5 @@ # Node -Versão escolhida: 6.x | 8.x +Versão escolhida: 7.10.0 # PHP -Versão escolhida: 5.4 | 5.5 | 5.6 | 5.7 | 7.0 | 7.1 | 7.2 \ No newline at end of file +Versão escolhida: 7.1 \ No newline at end of file From 18fee90612ab014ad7130723e401b70438efafbb Mon Sep 17 00:00:00 2001 From: Jonathan Veloso Date: Tue, 31 Jul 2018 02:09:57 -0300 Subject: [PATCH 7/8] =?UTF-8?q?teste=20pr=C3=A1tico=20-=20node?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node/controllers.js | 58 +++++++++++++++++++++++++++++++++++++++++++++ node/index.js | 56 +++++-------------------------------------- 2 files changed, 64 insertions(+), 50 deletions(-) create mode 100644 node/controllers.js diff --git a/node/controllers.js b/node/controllers.js new file mode 100644 index 0000000..c2b4604 --- /dev/null +++ b/node/controllers.js @@ -0,0 +1,58 @@ +var clients = require('restify-clients'); +var cache = require('memory-cache'); +var client = clients.createJsonClient({ + url: "https://olinda.bcb.gov.br" +}); + + +module.exports = { + hello: (req, res) => { + res.send('Test Hot Milhas'); + }, + + cotar: (req, res) => { + let cotacao = cache.get('cotacao'); + if (cotacao) { + res.send(cotacao); + } else { + client.get(`/olinda/servico/PTAX/versao/v1/odata/CotacaoDolarDia(dataCotacao=@dataCotacao)?@dataCotacao='07-20-2018'&$top=100&$format=json`, (error, reqx, resx, retornox) => { + cache.put('cotacao', retornox, 14400000); + res.send(retornox); + }); + } + }, + + addOrder: (req, res) => { + let items = req.body.items; + let total = 0.0; + + items.forEach(item => { + total += item; + }) + + let orders = cache.get('orders'); + let id = 1; + if (orders) { + id = orders[orders.length - 1].id + 1; + } else { + console.log('nao tem') + orders = []; + } + + item = { + id: id, + createdAt: '30/07/2018', + totalBRL: total, + totalUSD: total * 3.73 + } + + orders.push(item); + cache.put('orders', orders); + res.send(item); + }, + + orders: (req, res) => { + let orders = cache.get('orders'); + res.send(orders ? orders : []); + } +} diff --git a/node/index.js b/node/index.js index cb251d8..67c5d5a 100644 --- a/node/index.js +++ b/node/index.js @@ -1,7 +1,6 @@ var express = require('express'); var app = express(); var bodyParser = require('body-parser'); -var cache = require('memory-cache'); app.use(function (req, res, next) { res.header("Access-Control-Allow-Origin", "*"); @@ -12,60 +11,17 @@ app.use(function (req, res, next) { app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); -var clients = require('restify-clients'); -var client = clients.createJsonClient({ - url: "https://olinda.bcb.gov.br" -}); - -app.get('/', function (req, res) { - res.send('hello world'); -}); - -app.get('/api/brl-usd', function (req, res) { - let cotacao = cache.get('cotacao'); - if(cotacao){ - res.send(cotacao); - }else{ - client.get(`/olinda/servico/PTAX/versao/v1/odata/CotacaoDolarDia(dataCotacao=@dataCotacao)?@dataCotacao='07-20-2018'&$top=100&$format=json`, (error, reqx, resx, retornox) => { - cache.put('cotacao',retornox, 14400000); - res.send(retornox); - }); - } -}); - -app.post('/api/orders', function (req, res) { - let items = req.body.items; - let total = 0.0; - items.forEach(item=>{ - total += item; - }) +// routes +controllers = require('./controllers.js'); - let orders = cache.get('orders'); - let id = 1; - if(orders){ - id = orders[orders.length - 1].id + 1; - }else{ - console.log('nao tem') - orders = []; - } +app.get('/', controllers.hello); - item = { - id: id, - createdAt: '30/07/2018', - totalBRL: total, - totalUSD: total * 3.73 - } +app.get('/api/brl-usd', controllers.cotar); - orders.push(item); - cache.put('orders',orders); - res.send(item); -}); +app.post('/api/orders', controllers.addOrder); -app.get('/api/orders', function (req, res) { - let orders = cache.get('orders'); - res.send(orders?orders:[]); -}); +app.get('/api/orders', controllers.orders); const porta = 3000; From e45c5c53c6fde99549d0a7caf322b0cf199dbb32 Mon Sep 17 00:00:00 2001 From: Jonathan Veloso Date: Tue, 31 Jul 2018 02:10:51 -0300 Subject: [PATCH 8/8] =?UTF-8?q?teste=20pr=C3=A1tico=20-=20node?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node/controllers.js | 1 - 1 file changed, 1 deletion(-) diff --git a/node/controllers.js b/node/controllers.js index c2b4604..d5057e8 100644 --- a/node/controllers.js +++ b/node/controllers.js @@ -35,7 +35,6 @@ module.exports = { if (orders) { id = orders[orders.length - 1].id + 1; } else { - console.log('nao tem') orders = []; }