Skip to content

Commit

Permalink
Use new password
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth10001 committed Feb 28, 2024
1 parent 55f5118 commit f2ac6c5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion backend/udp/server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require('dotenv').config()
const udp = require('dgram')
const axios = require('axios')

Expand All @@ -12,7 +13,18 @@ client.on('message',function(msg,info){

if ("model" in data) {
const {model, ...rest} = data
axios.post("http://localhost:9000/api/" + data['model'], rest)
const API_USERNAME = process.env?.["API_USERNAME"] ?? ""
const API_PASSWORD = process.env?.["API_PASSWORD"] ?? ""
axios.post(
"http://localhost:9000/api/" + data['model'],
rest,
{
headers: {
"username": API_USERNAME,
"password": API_PASSWORD,
}
}
)
}
});

Expand Down

0 comments on commit f2ac6c5

Please sign in to comment.