Ethermap collaborative map tool inspired by etherpad.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
333 B

import MapModel from '../db/models/map.js'
const setPoint = async (req, res, next) => {
try {
const { mapId, point } = req.body
const map = await MapModel.query().findById(mapId)
const p = await map.$relatedQuery('map_points').insert(point)
res.json(p)
} catch (err) {
next(err)
}
}
export { setPoint }