travopti/backend/models/getCountryById.js
Timo John 3f0ce4cb4b Matched getRegions to API Specification
Matched getRegionsByID to API Specification
2020-06-16 23:17:44 +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;
};