mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-22 22:47:02 +00:00
clean up node api
This commit is contained in:
parent
ced90a70ae
commit
7fab654849
@ -7,15 +7,6 @@ const app = express()
|
||||
app.use(cors())
|
||||
const port = 3000
|
||||
|
||||
const getRealEstates = (request, response) => {
|
||||
pool.query('SELECT * FROM real_estae ORDER BY id ASC', (error, results) => {
|
||||
if (error) {
|
||||
throw error
|
||||
}
|
||||
response.status(200).json(results.rows)
|
||||
})
|
||||
}
|
||||
|
||||
app.use(bodyParser.json());
|
||||
app.use(
|
||||
bodyParser.urlencoded({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user