Update of multiple entries at once

Hi… I am trying to create a custom route that finds all messages with specific conversation id, where the sender is not the user id i am passing and where is_read is set to false and update to is_read:true…

So all messages NOT sent from this user that belong in the conversation of the user to be marked as read in other words. But i can’t manage to find out how. Could anyone help with this?

async bulkread(ctx) {
    
        const { conversation, user } = ctx.params;
        
        let entities;

        entities = await strapi.services.message.update({ conversation:conversation, sender_ne:user, is_read:false },{is_read:true});

        return entities;
    },

await strapi.query(‘message’).model.updateMany({ conversation:conversation, sender:{$ne:user},is_read:false },{is_read:true});

this is the solution…

with the .model you access all methods of the documentation
mongoosejs:
https://mongoosejs.com/