Category : backend

I have to go through the entire collection and update the ones that match it. I must update an array and remove the object by matching the criteria. Structure: { posts:[ { _id, timestamp, createdBy: { userId } }] } Query: collection.update( {}, { $pull: { ‘posts.$[].createdBy.userId’: mongo.ObjectId(userId) } }, { multi: true }, () ..

Read more

Hello i have: "TokenError: Invalid "code" in request" error i dont know where it is. But i tested it and code that makes this error is: const passport = require("passport"); const DiscordStrategy = require("passport-discord"); const User = require(‘../database/schemas/User’); passport.serializeUser((user, done) => { done(null, user.discordId) }); passport.deserializeUser(async (discordId, done) => { try { const user = ..

Read more

i have a problem since i have updated our Magento from 2.3.5 to 2.4.0. Here is the problem: We will open the invoice view in backend. So we go to: ->Sales->orders->select an order (my order: DE001014408) ->go to Invoices->view The page loads everything without layout: view without layout view without layout CSS/JS But if i ..

Read more

I want to use the token that I stored in local storage but when I try to decode it, it says invalid signature (even though I copied and pasted the same string). import socketIOClient from "socket.io-client"; const token = localStorage.getItem("access_token"); console.log("token", token) const URL = "http://localhost:4001"; const socket = socketIOClient(URL, { transportOptions: { polling: { ..

Read more

Besides common technical skills in Ruby on Rails (Ruby, Rails framework, postgreSQL, heroku deployment, Git); I also have intermediate skills in plain CSS (with knowledge of flexbox, grid), HTML, jQuery, Javascript. Which library, or technology skills can I learn more to use with what I have learnt? One library I notice on the market is ..

Read more