Skip to content

Commit

Permalink
Give item results in a timneout error
Browse files Browse the repository at this point in the history
Fixes #102
  • Loading branch information
niekcandaele committed Jul 2, 2020
1 parent a9a0fdf commit 5dc4b29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/controllers/Player/give-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = {
cmdToExec = `give ${player.entityId} ${inputs.itemName} ${inputs.amount} ${inputs.quality ? inputs.quality : ''}`;
}

let response = await SdtdApi.executeConsoleCommand({
let response = await sails.helpers.sdtdApi.executeConsoleCommand({
ip: server.ip,
port: server.webPort,
adminUser: server.authName,
Expand All @@ -75,15 +75,15 @@ module.exports = {
}


await SdtdApi.executeConsoleCommand({
await sails.helpers.sdtdApi.executeConsoleCommand({
ip: server.ip,
port: server.webPort,
adminUser: server.authName,
adminToken: server.authToken
}, `pm ${player.steamId} "CSMM - You have received ${inputs.amount} of ${inputs.itemName}"`);

sails.log.info(`API - Player:give-item - giving ${inputs.amount} of ${inputs.itemName} to ${inputs.playerId} with quality: ${inputs.quality}`);

return exits.success();
} catch (error) {
sails.log.error(`API - Player:give-item - ${error}`);
return exits.error(error);
Expand Down

0 comments on commit 5dc4b29

Please sign in to comment.