backend: fixed loading of routes

This commit is contained in:
muerwre 2018-12-06 14:13:36 +07:00
parent b8431abeeb
commit cc4dff0ca1
10 changed files with 73 additions and 74 deletions

View file

@ -25,7 +25,9 @@ module.exports = async (req, res) => {
if (exists && !force) return res.send({ success: false, mode: 'overwriting' });
if (exists) {
exists.set({ title, route, stickers, logo, distance }).save();
exists.set({
title, route, stickers, logo, distance, updated_at: Date.now(),
}).save();
return res.send({
success: true, title, address, route, stickers, mode: 'overwrited'