Skip to content

Commit

Permalink
PB-742: Use permalink for the report problem email.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed Jun 27, 2024
1 parent e56b5c0 commit ef04df6
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/api/feedback.api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import axios from 'axios'

import { getKmlFromUrl } from '@/api/files.api'
import { createShortLink } from '@/api/shortlink.api'
import { API_SERVICES_BASE_URL, APP_VERSION } from '@/config'
import log from '@/utils/logging'

Expand All @@ -22,18 +21,6 @@ export default async function sendFeedback(subject, text, options) {
const { kmlFileUrl = null, kml = null, email = null, attachment = null } = options

try {
let shortLink = null
try {
shortLink = await createShortLink(window.location.href)
} catch (err) {
log.error(
'could not generate a short link, will send the full URL to service feedback',
err
)
// fallback to full URL
shortLink = window.location.href
}

let kmlData = null
if (kmlFileUrl) {
try {
Expand All @@ -55,7 +42,7 @@ export default async function sendFeedback(subject, text, options) {
feedback: text,
version: APP_VERSION,
ua: navigator.userAgent,
permalink: shortLink,
permalink: window.location.href,
kml: kmlData,
email,
attachment,
Expand Down

0 comments on commit ef04df6

Please sign in to comment.