Skip to content

Commit 4acc022

Browse files
committed
corrected URL constructors in Pcs and Weather modules in client
1 parent 1fa751c commit 4acc022

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client/src/components/Pcs.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const Pcs = () => {
1212

1313
useEffect(() => {
1414
async function fetchPCSContracts() {
15-
let baseUrl = "https://rigsnvapi.azurewebsites.net/pcs_contracts";
16-
let url = new URL("/", baseUrl);
15+
let baseUrl = "https://rigsnvapi.azurewebsites.net";
16+
let url = new URL("/pcs_contracts", baseUrl);
1717
try {
1818
const response = await fetch(url, {
1919
method: 'GET',

client/src/components/Weather.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const Weather = () => {
1010
useEffect(() => {
1111

1212
async function fetchWeatherData() {
13-
let baseUrl = "https://rigsnvapi.azurewebsites.net/weather";
14-
let url = new URL("/", baseUrl);
13+
let baseUrl = "https://rigsnvapi.azurewebsites.net";
14+
let url = new URL("/weather", baseUrl);
1515
try {
1616
const coordinates = await getLocation();
1717
try {

0 commit comments

Comments
 (0)