Skip to content

Commit

Permalink
Remove DONATE_URL_RU
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Tsisyk <[email protected]>
  • Loading branch information
rtsisyk authored Aug 13, 2024
1 parent 9a9af6f commit 671d493
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/servers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const SERVER = {

// Exported for tests.
export const DONATE_URL = 'https://organicmaps.app/donate/';
export const DONATE_URL_RU = 'https://donate.organicmaps.ru/';

export async function getServersList(request: Request) {
// Private for map files.
Expand Down Expand Up @@ -152,17 +151,10 @@ export async function getServersList(request: Request) {
if (donatesEnabled) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore workarounds error TS2339: Property 'country' does not exist on type 'IncomingRequestCfProperties<unknown>'.
if (request.cf?.country == 'RU') {
response.settings = {
DonateUrl: DONATE_URL_RU,
NY: 'false', // Must be `string` instead of `bool`, otherwise clients will crash
};
} else {
response.settings = {
DonateUrl: DONATE_URL,
NY: 'false', // Must be `string` instead of `bool`, otherwise clients will crash
};
}
response.settings = {
DonateUrl: DONATE_URL,
NY: 'false', // Must be `string` instead of `bool`, otherwise clients will crash
};
}

return new Response(JSON.stringify(response), {
Expand Down

0 comments on commit 671d493

Please sign in to comment.