Skip to content

Error while using the /api/session #3

@NazarShuk

Description

@NazarShuk

The script throws this error when i make a request to the /api/session

C:\Users\nazar\WebstormProjects\hctb-api\index.js:49
      res.json({ success: true, ...value, lat: lat, lon: lon, cookie })
                                   ^

ReferenceError: value is not defined
    at C:\Users\nazar\WebstormProjects\hctb-api\index.js:49:36
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.12.2

I tried removing the ...value from the line 49. It doesn't throw the error, but now there arent any data in the response

{
  "success": true,
  "cookie": "cookie12346765756"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions