[web] Remove unused redirects

This commit is contained in:
Manav Rathi
2024-09-09 13:40:44 +05:30
parent 0aeff4a8ae
commit 289ddd673b
3 changed files with 1 additions and 24 deletions

View File

@@ -1,5 +1,4 @@
export enum REDIRECTS {
ROADMAP = "roadmap",
FAMILIES = "families",
}

View File

@@ -55,7 +55,6 @@ import { resumeExportsIfNeeded } from "services/export";
import { photosLogout } from "services/logout";
import {
getFamilyPortalRedirectURL,
getRoadmapRedirectURL,
updateMapEnabledStatus,
} from "services/userService";
import "styles/global.css";
@@ -68,10 +67,7 @@ import {
getUpdateReadyToInstallMessage,
} from "utils/ui";
const redirectMap = new Map([
[REDIRECTS.ROADMAP, getRoadmapRedirectURL],
[REDIRECTS.FAMILIES, getFamilyPortalRedirectURL],
]);
const redirectMap = new Map([[REDIRECTS.FAMILIES, getFamilyPortalRedirectURL]]);
/**
* Properties available via {@link AppContext} to the Photos app's React tree.

View File

@@ -63,24 +63,6 @@ export const getFamiliesToken = async () => {
}
};
export const getRoadmapRedirectURL = async () => {
try {
const token = getToken();
const resp = await HTTPService.get(
await apiURL("/users/roadmap/v2"),
null,
{
"X-Auth-Token": token,
},
);
return resp.data["url"];
} catch (e) {
log.error("failed to get roadmap url", e);
throw e;
}
};
export const isTokenValid = async (token: string) => {
try {
const resp = await HTTPService.get(