Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

500
Views
I had Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters, How to fix it? i need a example code for sure

**

this is my code, I've tried several references but I can't find a solution for my case. please help, i need some example for sure..

**

app.post('/sendFriendRequest', function (request, result) {
  var accessToken = request.fields.accessToken;
  var _id = request.fields._id;

  database.collection('users').findOne(
    {
      accessToken: accessToken,
    },
    function (error, user) {
      if (user == null) {
        result.json({
          status: 'error',
          message: 'Pengguna telah keluar. Silahkan masuk kembali.',
        });
      } else {
        var me = user;
        database.collection('users').findOne(
          {
            _id: ObjectId(),
          },
          function (error, user) {
            if (user == null) {
              result.json({
                status: 'error',
                message: 'Pengguna tidak ditemukan.',
              });
            } else {
              database.collection('users').updateOne(
                {
                  _id: ObjectId(),
                },

this is part of my code

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!