Skip to content

Commit

Permalink
osmApi: fix edit URL (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbycz authored Oct 20, 2023
1 parent 6fdb1a8 commit b8eb30a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/services/osmApiAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const {
publicRuntimeConfig: { osmappVersion },
} = getConfig();

const osmUrl = prod
? 'https://api.openstreetmap.org'
const osmEditUrl = prod
? 'https://www.openstreetmap.org' // iD uses same URL https://ideditor.netlify.app/
: 'https://master.apis.dev.openstreetmap.org';

const oauth = prod
Expand All @@ -39,7 +39,7 @@ const auth = new OsmAuth({
...oauth,
auto: true,
landing: '/oauth-token.html',
url: osmUrl,
url: osmEditUrl,
});

const authFetch = async (options) =>
Expand Down Expand Up @@ -235,7 +235,7 @@ export const editOsmFeature = async (
return {
type: 'edit',
text: changesetComment,
url: `${osmUrl}/changeset/${changesetId}`,
url: `${osmEditUrl}/changeset/${changesetId}`,
redirect: `${getOsmappLink(feature)}`,
};
};
Expand Down Expand Up @@ -271,7 +271,7 @@ export const addOsmFeature = async (
return {
type: 'edit',
text: changesetComment,
url: `${osmUrl}/changeset/${changesetId}`,
url: `${osmEditUrl}/changeset/${changesetId}`,
redirect: `/${getUrlOsmId(apiId)}`,
};
};

1 comment on commit b8eb30a

@vercel
Copy link

@vercel vercel bot commented on b8eb30a Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

osmapp – ./

osmapp.vercel.app
osmapp-git-master-zbycz.vercel.app
osmapp.org
osmapp-zbycz.vercel.app

Please sign in to comment.