mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
basic UI for row editing
This commit is contained in:
parent
3ea920c1f8
commit
32e1b4c3fd
13 changed files with 248 additions and 65 deletions
|
@ -4,15 +4,15 @@ const { generateGuest, generateRandomUrl } = require('./guest');
|
|||
module.exports = async (req, res) => {
|
||||
const { id, token } = req.query;
|
||||
|
||||
const user = await User.findOne({ _id: id, token })
|
||||
.populate({
|
||||
path: 'routes',
|
||||
select: '_id title distance owner updated_at',
|
||||
options: {
|
||||
limit: 200,
|
||||
sort: { updated_at: -1 },
|
||||
}
|
||||
});
|
||||
const user = await User.findOne({ _id: id, token });
|
||||
// .populate({
|
||||
// path: 'routes',
|
||||
// select: '_id title distance owner updated_at',
|
||||
// options: {
|
||||
// limit: 200,
|
||||
// sort: { updated_at: -1 },
|
||||
// }
|
||||
// })
|
||||
|
||||
const random_url = await generateRandomUrl();
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ module.exports = async (req, res) => {
|
|||
{
|
||||
...criteria,
|
||||
},
|
||||
'_id title distance owner updated_at',
|
||||
'_id title distance owner updated_at is_public',
|
||||
{
|
||||
limit: 500,
|
||||
sort: { updated_at: -1 },
|
||||
}
|
||||
).populate('owner');
|
||||
).populate('owner', '_id');
|
||||
|
||||
list = list.filter(item => (
|
||||
!author || item.owner._id === author
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue