[web] Remove unused redirects
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
export enum REDIRECTS {
|
||||
ROADMAP = "roadmap",
|
||||
FAMILIES = "families",
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user