mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
save: public switch
This commit is contained in:
parent
69f23c9e48
commit
b7f2c7c382
10 changed files with 31 additions and 27 deletions
|
@ -12,7 +12,7 @@ const RouteSchema = new Schema(
|
|||
stickers: { type: Array, default: [] },
|
||||
owner: { type: Schema.Types.ObjectId, ref: 'User' },
|
||||
distance: { type: Number, default: 0 },
|
||||
public: { type: Boolean, default: true },
|
||||
is_public: { type: Boolean, default: false },
|
||||
created_at: { type: Date, default: Date.now() },
|
||||
updated_at: { type: Date, default: Date.now() },
|
||||
logo: { type: String, default: 'DEFAULT' },
|
||||
|
|
|
@ -24,7 +24,7 @@ module.exports = async (req, res) => {
|
|||
if (!author || !user || (user._id !== author)) {
|
||||
criteria = {
|
||||
...criteria,
|
||||
public: true,
|
||||
is_public: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -141,6 +141,7 @@ const run = async () => {
|
|||
title: '',
|
||||
version: 1,
|
||||
distance: calcPolyDistance(route),
|
||||
is_public: false,
|
||||
};
|
||||
}));
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue