Skip to content

Commit

Permalink
Move API URL to environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
edonmez01 committed Apr 30, 2024
1 parent a90c253 commit 5f88aa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/mobile/App/Screens/SearchResultScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "react-native";
import axios from "axios";
import Post from "../components/Post";
import {VITE_API_URL} from "@env";

export default function SearchResultScreen({ navigation, route }) {
const [error, setError] = useState();
Expand All @@ -18,7 +19,7 @@ export default function SearchResultScreen({ navigation, route }) {
console.log(route.params.param);
axios
.get(
"http://192.168.64.163:8080/api/v1/posts?param=" + route.params.param,
`${VITE_API_URL}/api/v1/posts?param=` + route.params.param,
{
headers: { Authorization: `Bearer ${route.params.authToken}` },
}
Expand Down

0 comments on commit 5f88aa5

Please sign in to comment.