travopti/backend/models/getCountryById.js
Timo John 8b0064a5b9 Matched getRegions to API Specification
Matched getRegionsByID to API Specification
2020-06-17 21:50:28 +02:00

13 lines
306 B
JavaScript

module.exports = async (dbConn, id) => {
const country = await dbConn.query(
`SELECT countries.id AS country_id,
countries.country AS name,
countries.description
FROM countries
WHERE countries.id = ?`,
[id]
);
return country;
};