Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard coded url #17

Closed
tombomb opened this issue Feb 24, 2023 · 1 comment · Fixed by #18
Closed

Hard coded url #17

tombomb opened this issue Feb 24, 2023 · 1 comment · Fixed by #18
Assignees
Labels
bug Something isn't working

Comments

@tombomb
Copy link

tombomb commented Feb 24, 2023

https://github.com/msdigital/oasis/blob/master/server/api.js#L63

module.exports.getEconomy = function(cb) {
  request
    .get('http://176.57.169.251:8600/feed/dedicated-server-savegame.html?code=M8La9eRC&file=economy')
    .end(function (err, xml) {
      if (err) {
        logger.error(err);
      }
      var result = util.convert2json(xml.body)
      cb(new Economy(result.economy))
    })
}

also if you look at my fork you can see how to set this up in a docker container with github actions (if you still use the project)

some other small things, if you dont turn on a mod or a dlc, it crashes, same with if there is no vehicles yet, other then that its looking super cool

@tombomb
Copy link
Author

tombomb commented Feb 24, 2023

The no mods on give you the error

/app/server/model/server.js:6
  this.mods = getMods(server.Mods.Mod)
                                  ^
TypeError: Cannot read properties of undefined (reading 'Mod')
    at new module.exports.Server (/app/server/model/server.js:6:35)
    at /app/server/api.js:43:15
    at /app/server/api.js:30:7
    at Request.callback (/app/node_modules/superagent/lib/node/index.js:917:12)
    at /app/node_modules/superagent/lib/node/index.js:1145:18
    at IncomingMessage.<anonymous> (/app/node_modules/superagent/lib/node/parsers/image.js:10:5)
    at IncomingMessage.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
    ```

@msdigital msdigital added the bug Something isn't working label Mar 17, 2023
@msdigital msdigital self-assigned this Mar 17, 2023
msdigital added a commit that referenced this issue Mar 17, 2023
msdigital added a commit that referenced this issue Mar 17, 2023
@msdigital msdigital mentioned this issue Mar 17, 2023
@msdigital msdigital linked a pull request Mar 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants