diff --git a/api.js b/server/api.js similarity index 94% rename from api.js rename to server/api.js index 91e6cb3..b56df21 100644 --- a/api.js +++ b/server/api.js @@ -47,17 +47,18 @@ app.get('/api/v1/rooms/:id', (req, res) => { // Create one room app.post("/api/v1/rooms", async (req, res) => { try { - - } catch (error) { - console.log(error) - } - console.log(req.body); - res.status(201).json({ - status: "success", - data: { + + console.log(req.body); + res.status(201).json({ + status: "success", + data: { room: "005" } }); + } catch (error) { + console.log(error) + } + }); // Update one room diff --git a/src/index.js b/src/index.js index 154952f..8e19323 100644 --- a/src/index.js +++ b/src/index.js @@ -13,3 +13,8 @@ root.render( // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals reportWebVitals(); + +const express = require('express'); +const server = express(); +const pool = require("./databasescripts/db"); + diff --git a/src/utils/cpf.js b/src/utils/cpf.js index fd0ec80..ba323fa 100644 --- a/src/utils/cpf.js +++ b/src/utils/cpf.js @@ -17,4 +17,6 @@ function verifyCpf(somecpf) { else { return false } -}; \ No newline at end of file +}; + +export default verifyCpf; \ No newline at end of file