mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
stickers: drawing arrow + text
This commit is contained in:
parent
f183c8593d
commit
9729a9e117
11 changed files with 120 additions and 25 deletions
|
@ -14,3 +14,5 @@ const database = mongoose.connection;
|
|||
|
||||
database.on('error', (err) => { console.error(`Database Connection Error: ${err}`); process.exit(2); });
|
||||
database.on('connected', () => { console.info('Succesfully connected to MongoDB Database'); });
|
||||
|
||||
console.log(`DB: mongodb://${USER}:${PASSWORD}@${HOSTNAME}:${PORT}/${DATABASE}`);
|
||||
|
|
|
@ -8,8 +8,8 @@ const RouteSchema = new Schema(
|
|||
title: { type: String, default: '' },
|
||||
// address: { type: String, required: true },
|
||||
version: { type: Number, default: 2 },
|
||||
route: { type: Array },
|
||||
stickers: { type: Array },
|
||||
route: { type: Array, default: [] },
|
||||
stickers: { type: Array, default: [] },
|
||||
owner: { type: Schema.Types.ObjectId, ref: 'User' },
|
||||
logo: { type: String, default: 'DEFAULT' },
|
||||
distance: { type: Number, default: 0 },
|
||||
|
|
|
@ -8,7 +8,7 @@ module.exports = async (req, res) => {
|
|||
path: 'routes',
|
||||
options: {
|
||||
limit: 100,
|
||||
sort: { updated: 1 },
|
||||
sort: { updated_at: -1 },
|
||||
}
|
||||
});
|
||||
const random_url = await generateRandomUrl();
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports.parseRoute = route => route.filter(el => (
|
|||
));
|
||||
|
||||
module.exports.parseStickers = stickers => stickers.filter(el => (
|
||||
Object.keys(el).length === 4
|
||||
Object.keys(el).length === 5
|
||||
&& el.latlng
|
||||
&& Object.keys(el.latlng).length === 2
|
||||
&& el.latlng.lat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue