Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

94
Vistas
Drag and drop with express and mongoose

I have a linktree clone project where you can build your portofolio from multiple urls. At the moment, the links are in a chronological order (when they were put in the database). I want to be able to modify their order but don't know what is the best aproach or where to start. The only thing that I could think of was an array stored in Page Schema with the orders of id urls(named pageLayout). I'm a beginner and still learning

The JSON generated is something like this:

{
"theme": "white",
"banner": "uploads/banners/default.png",
"avatar": "uploads/avatars/default.png",
"pageLayout": [],
"_id": "62825469a716308778488106",
"urlName": "test",
"title": "TEST",
"description": "TEST PAGE",
"category": "Photography",
"socialMedia": {
    "Instagram": "test",
    "Twitter": "test.twitter",
    "Tiktok": "test.tiktok"
},
"__v": 0,
"blocks": [
    {
        "blockType": "links",
        "_id": "628a646534a2f89b190bb309",
        "title": "Learn Blockchain1",
        "user": "628172dff7334877a4ecf19e",
        "pageId": "62825469a716308778488106",
        "__v": 0,
        "links": [
            {
                "display": true,
                "thumbnail": "uploads/linkThumbnails/default.png",
                "_id": "628a732533d84c9cf988993b",
                "blockId": "628a646534a2f89b190bb309",
                "title": "First Project1",
                "url": "www.test.com/ethkasbdj",
                "user": "628172dff7334877a4ecf19e",
                "__v": 0
            },{
                "display": true,
                "thumbnail": "uploads/linkThumbnails/default.png",
                "_id": "628a732533d84c9cf988993b",
                "blockId": "628a646534a2f89b190bb309",
                "title": "First Project2",
                "url": "www.test.com/ethkasbdj",
                "user": "628172dff7334877a4ecf19e",
                "__v": 0
            }
        ],
        "id": "628a646534a2f89b190bb309"
    }
],
"id": "62825469a716308778488106"
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda