Browse Source

фикс долбаебов которые кидают несколько вещей, а лучший язык яп не понимает разницу между double и int

master
gsd 1 year ago
parent
commit
6cf8f13ec6
  1. 5
      Dockerfile
  2. 2
      backend_integration.js
  3. 3
      package.json

5
Dockerfile

@ -1,11 +1,14 @@
FROM node:18.18-bullseye FROM node:18.18-bullseye
ARG BUILDDATE
ENV BUILDDATE $BUILDDATE
RUN git clone https://git.pblr-nyk.pro/gsd/Facti13.SteamTradeBot.JS.v1 && \ RUN git clone https://git.pblr-nyk.pro/gsd/Facti13.SteamTradeBot.JS.v1 && \
mv Facti13.SteamTradeBot.JS.v1 /app && chown node:node -R /app && chmod 770 -R /app && \ mv Facti13.SteamTradeBot.JS.v1 /app && chown node:node -R /app && chmod 770 -R /app && \
echo "const VERSION = $(date +%s);module.exports = VERSION;" > /app/version.js echo "const VERSION = $(date +%s);module.exports = VERSION;" > /app/version.js
USER node USER node
WORKDIR /app WORKDIR /app
RUN npm install RUN npm install --reg https://nexus.pblr-nyk.pro/repository/npm/
CMD ["nodejs", "tradebot.js"] CMD ["nodejs", "tradebot.js"]

2
backend_integration.js

@ -31,7 +31,7 @@ class BackendIntegration {
} }
vip(steam64, amount, extra, uniq) { vip(steam64, amount, extra, uniq) {
axios.post(`${this.url}/api/external/vip?steam=${steam64}&amount=${amount}&service=steam&extra=${extra}&unique=${uniq}`, {}, {headers:{Cookie:`secretkey=${this.secret_key};`}}).then( axios.post(`${this.url}/api/external/vip?steam=${steam64}&amount=${Math.round(amount)}&service=steam&extra=${extra}&unique=${uniq}`, {}, {headers:{Cookie:`secretkey=${this.secret_key};`}}).then(
response => { response => {
if (response.status === 200) { if (response.status === 200) {
if (response.data === 0) { if (response.data === 0) {

3
package.json

@ -7,5 +7,8 @@
"steam-tradeoffer-manager": "^2.10.6", "steam-tradeoffer-manager": "^2.10.6",
"steam-user": "^5.0.4", "steam-user": "^5.0.4",
"steamcommunity": "^3.47.1" "steamcommunity": "^3.47.1"
},
"publishConfig": {
"registry": "https://nexus.pblr-nyk.pro/repository/npm/"
} }
} }

Loading…
Cancel
Save