We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1d39f8 commit 22fb065Copy full SHA for 22fb065
src/pages/api/josh.ts
@@ -1,5 +1,6 @@
1
import axios from 'axios';
2
import type { NextApiRequest, NextApiResponse } from 'next'
3
+require('dotenv').config()
4
5
type ResponseData = {
6
message: string
@@ -13,7 +14,7 @@ export default function handler(
13
14
const { subject } = query;
15
16
// make request to josh's crappy go server
- axios.get(`http://82.165.5.190:8888/short_fact/${subject || "gecko"}`).then((response) => {
17
+ axios.get(`${process.env.JOSH_API}/short_fact/${subject || "gecko"}`).then((response) => {
18
res.status(200).json({ message: response.data });
19
}).catch((err) => {
20
res.status(500).json({ message: `Error querying Josh's API (skill issue): ${err}` });
0 commit comments