Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Commit

Permalink
Fix api url
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolofrison committed Apr 15, 2020
1 parent 74975f1 commit b201049
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions commands/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const botLogin = (bot) => {
const username = message.from.username;
const chatId = message.from.id;
axios
.post(`http://localhost:9999/auth/telegram`, {
.post(`http://thirema-api:9999/auth/telegram`, {
telegramName: username,
telegramChat: chatId,
})
Expand All @@ -30,7 +30,7 @@ const botLogin = (bot) => {
.catch((err) => {
console.log(err);
// console.log(err.status);
if (err.response.status === 403) {
if (err.response != null && err.response.status === 403) {
return message.reply(
"Rieffettua l'autenticazione usando il comando /login"
);
Expand Down
4 changes: 2 additions & 2 deletions commands/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const botStatus = (bot) => {
const username = message.from.username;
console.log(username);
axios
.get(`http://localhost:9999/users?telegramName=` + username)
.get(`http://thirema-api:9999/users?telegramName=` + username)
.then((res) => {
console.log(res.data);
const data = res.data[0];
Expand All @@ -30,7 +30,7 @@ const botStatus = (bot) => {
);
})
.catch((err) => {
if (err.response.status === 403) {
if (err.response != null && err.response.status === 403) {
message.reply("Rieffettua l'autenticazione usando il comando /login");
} else {
message.reply("Errore nel controllo dei dati");
Expand Down

0 comments on commit b201049

Please sign in to comment.