Spaces:
Sleeping
Sleeping
Update server.js
Browse files
server.js
CHANGED
@@ -90,7 +90,7 @@ app.post('/gen', async (req, res) => {
|
|
90 |
}
|
91 |
|
92 |
try {
|
93 |
-
const response = await axios.
|
94 |
headers: {
|
95 |
'Authorization': `Bearer ${apiKey}`,
|
96 |
'Content-Type': 'application/json',
|
@@ -135,7 +135,7 @@ app.post('/translate', async (req, res) => {
|
|
135 |
};
|
136 |
|
137 |
try {
|
138 |
-
const response = await axios.
|
139 |
headers: {
|
140 |
'Authorization': `Bearer ${apiKey}`,
|
141 |
'Content-Type': 'application/json',
|
|
|
90 |
}
|
91 |
|
92 |
try {
|
93 |
+
const response = await axios.post(base_url, payload, {
|
94 |
headers: {
|
95 |
'Authorization': `Bearer ${apiKey}`,
|
96 |
'Content-Type': 'application/json',
|
|
|
135 |
};
|
136 |
|
137 |
try {
|
138 |
+
const response = await axios.post(base_url, payload, {
|
139 |
headers: {
|
140 |
'Authorization': `Bearer ${apiKey}`,
|
141 |
'Content-Type': 'application/json',
|