mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-23 01:46:39 +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())
|
app.use(cors())
|
||||||
const port = 3000
|
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.json());
|
||||||
app.use(
|
app.use(
|
||||||
bodyParser.urlencoded({
|
bodyParser.urlencoded({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user