remove unused imageUrl in localStorage (since temp table is being used)
This commit is contained in:
@@ -1732,8 +1732,9 @@ export const PlatformServiceMixin = {
|
|||||||
// =================================================
|
// =================================================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get temporary data by ID - $getTemp()
|
* Get data from temp table by ID
|
||||||
* Retrieves temporary data from the temp table
|
* Currently set by main.capacitor.ts storeSharedImageInTempDB()
|
||||||
|
*
|
||||||
* @param id Temporary storage ID
|
* @param id Temporary storage ID
|
||||||
* @returns Promise<Temp | null> Temporary data or null if not found
|
* @returns Promise<Temp | null> Temporary data or null if not found
|
||||||
*/
|
*/
|
||||||
@@ -1747,8 +1748,8 @@ export const PlatformServiceMixin = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete temporary data by ID - $deleteTemp()
|
* Delete data from temp table by ID
|
||||||
* Removes temporary data from the temp table
|
*
|
||||||
* @param id Temporary storage ID
|
* @param id Temporary storage ID
|
||||||
* @returns Promise<boolean> Success status
|
* @returns Promise<boolean> Success status
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1520,7 +1520,7 @@ export default class AccountViewView extends Vue {
|
|||||||
} else {
|
} else {
|
||||||
logger.error("Non-success deleting image:", response);
|
logger.error("Non-success deleting image:", response);
|
||||||
this.notify.error(ACCOUNT_VIEW_CONSTANTS.ERRORS.IMAGE_DELETE_PROBLEM);
|
this.notify.error(ACCOUNT_VIEW_CONSTANTS.ERRORS.IMAGE_DELETE_PROBLEM);
|
||||||
// keep the imageUrl in localStorage so the user can try again if they want
|
// keep the profileImageUrl so the user can try again if they want
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (isApiError(error) && error.response?.status === 404) {
|
if (isApiError(error) && error.response?.status === 404) {
|
||||||
|
|||||||
@@ -401,7 +401,6 @@ export default class GiftedDetails extends Vue {
|
|||||||
|
|
||||||
this.imageUrl = ((this.$route.query["imageUrl"] as string) ||
|
this.imageUrl = ((this.$route.query["imageUrl"] as string) ||
|
||||||
this.prevCredToEdit?.claim?.image ||
|
this.prevCredToEdit?.claim?.image ||
|
||||||
localStorage.getItem("imageUrl") ||
|
|
||||||
this.imageUrl) as string;
|
this.imageUrl) as string;
|
||||||
|
|
||||||
// this is an endpoint for sharing project info to highlight something given
|
// this is an endpoint for sharing project info to highlight something given
|
||||||
@@ -577,7 +576,6 @@ export default class GiftedDetails extends Vue {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
localStorage.removeItem("imageUrl");
|
|
||||||
this.imageUrl = "";
|
this.imageUrl = "";
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error("Error deleting image:", error);
|
logger.error("Error deleting image:", error);
|
||||||
@@ -585,7 +583,6 @@ export default class GiftedDetails extends Vue {
|
|||||||
if ((error as any)?.response?.status === 404) {
|
if ((error as any)?.response?.status === 404) {
|
||||||
logger.log("Weird: the image was already deleted.", error);
|
logger.log("Weird: the image was already deleted.", error);
|
||||||
|
|
||||||
localStorage.removeItem("imageUrl");
|
|
||||||
this.imageUrl = "";
|
this.imageUrl = "";
|
||||||
|
|
||||||
// it already doesn't exist so we won't say anything to the user
|
// it already doesn't exist so we won't say anything to the user
|
||||||
@@ -749,7 +746,6 @@ export default class GiftedDetails extends Vue {
|
|||||||
logger.error("Error checking seed backup status:", error);
|
logger.error("Error checking seed backup status:", error);
|
||||||
}
|
}
|
||||||
|
|
||||||
localStorage.removeItem("imageUrl");
|
|
||||||
if (this.destinationPathAfter) {
|
if (this.destinationPathAfter) {
|
||||||
(this.$router as Router).push({ path: this.destinationPathAfter });
|
(this.$router as Router).push({ path: this.destinationPathAfter });
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user