Skip to content

Commit

Permalink
fix(pwa): set correct url for API
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Nov 25, 2022
1 parent a8e00a7 commit 52b99aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pwa/src/director/job-add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const jobAddSignal = new SignalInterface('job-add');
jobAddSignal.addListener(async (job) => {
try {
const response = await fetch({
url: window.appConfig?.api ?? '/job',
url: window.appConfig?.api + '/job' ?? '/job',
token: window.appConfig?.token,
method: 'PUT',
bodyJson: job,
Expand Down
2 changes: 1 addition & 1 deletion pwa/src/director/job-delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const jobDeleteSignal = new SignalInterface('job-delete');
jobDeleteSignal.addListener(async (id) => {
try {
const response = await fetch({
url: window.appConfig?.api ?? '/job',
url: window.appConfig?.api + '/job' ?? '/job',
token: window.appConfig?.token,
method: 'DELETE',
queryParameters: {id},
Expand Down
2 changes: 1 addition & 1 deletion pwa/src/director/job-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const jobListSignal = new SignalInterface('job-list');
jobListSignal.setProvider(async () => {
try {
const response = await fetch({
url: window.appConfig?.api ?? '/job',
url: window.appConfig?.api + '/job' ?? '/job',
token: window.appConfig?.token,
cacheStrategy: 'stale_while_revalidate',
});
Expand Down

0 comments on commit 52b99aa

Please sign in to comment.