Merge pull request #4276 from mozilla/fix-local-manual-broker-resolution

Fix manual data broker resolution request
This commit is contained in:
Florian Zia 2024-03-12 13:18:03 +01:00 коммит произвёл GitHub
Родитель d3952f5b99 59f16a91b7
Коммит 7a19a8c4d2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
13 изменённых файлов: 20 добавлений и 20 удалений

Просмотреть файл

@ -29,7 +29,7 @@ export default async function AutomaticRemovePage() {
const session = await getServerSession();
if (!session?.user?.subscriber?.id) {
redirect("/user/dashboard/");
redirect("/user/dashboard");
}
const additionalSubplatParams = await getAttributionsFromCookiesOrDb(

Просмотреть файл

@ -32,7 +32,7 @@ export const RemovalCard = (props: Props) => {
async function resolve() {
setIsResolved(true);
const response = await fetch(
`/api/v1/user/scan-result/${props.scanResult.onerep_scan_result_id}/resolution/`,
`/api/v1/user/scan-result/${props.scanResult.onerep_scan_result_id}/resolution`,
{
method: "POST",
credentials: "same-origin",

Просмотреть файл

@ -19,7 +19,7 @@ export default async function ManualRemovePage() {
const session = await getServerSession();
if (!session?.user?.subscriber?.id) {
redirect("/user/dashboard/");
redirect("/user/dashboard");
}
const countryCode = getCountryCode(headers());

Просмотреть файл

@ -18,7 +18,7 @@ export default async function ViewDataBrokers() {
const session = await getServerSession();
if (!session?.user?.subscriber?.id) {
redirect("/user/dashboard/");
redirect("/user/dashboard");
}
const countryCode = getCountryCode(headers());

Просмотреть файл

@ -23,7 +23,7 @@ export default async function WelcomeToPlusPage() {
// Ensure user is logged in
if (!checkSession(session) || !session?.user?.subscriber?.id) {
redirect("/user/dashboard/");
redirect("/user/dashboard");
}
// MNTOR-2594 - log any users that are on welcome-to-premium page but not subscribed.
@ -36,7 +36,7 @@ export default async function WelcomeToPlusPage() {
const profileId = await getOnerepProfileId(session.user.subscriber.id);
if (profileId === null) {
// If the user subscribed to Plus before running a scan, have them run one now:
redirect("/user/welcome/");
redirect("/user/welcome");
}
const scanData = await getLatestOnerepScanResults(profileId);

Просмотреть файл

@ -67,7 +67,7 @@ export default async function DashboardPage() {
countryCode,
}))
) {
return redirect("/user/welcome/");
return redirect("/user/welcome");
}
const latestScan = await getLatestOnerepScanResults(profileId);

Просмотреть файл

@ -107,7 +107,7 @@ export async function onAddEmail(
unverifiedSubscriber.id,
getL10n(),
);
revalidatePath("/user/settings/");
revalidatePath("/user/settings");
return {
success: true,
@ -160,7 +160,7 @@ export async function onRemoveEmail(email: SanitizedEmailAddressRow) {
try {
await removeOneSecondaryEmail(email.id, subscriber.id);
await deleteResolutionsWithEmail(subscriber.id, email.email);
revalidatePath("/user/settings/");
revalidatePath("/user/settings");
} catch (e) {
return {
success: false,

Просмотреть файл

@ -74,7 +74,7 @@ export const View = (props: Props) => {
scanLimitReached={props.scanLimitReached}
isHero
eligibleForPremium={props.eligibleForPremium}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard/`}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard`}
eventId={{
cta: "clicked_get_scan_header",
field: "entered_email_address_header",
@ -145,7 +145,7 @@ export const View = (props: Props) => {
<SignUpForm
scanLimitReached={props.scanLimitReached}
eligibleForPremium={props.eligibleForPremium}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard/`}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard`}
eventId={{
cta: "clicked_get_scan_second",
field: "entered_email_address_second",
@ -191,7 +191,7 @@ export const View = (props: Props) => {
<SignUpForm
scanLimitReached={props.scanLimitReached}
eligibleForPremium={props.eligibleForPremium}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard/`}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard`}
eventId={{
cta: "clicked_get_scan_third",
field: "entered_email_address_third",
@ -210,7 +210,7 @@ export const View = (props: Props) => {
</p>
<SignUpForm
eligibleForPremium={props.eligibleForPremium}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard/`}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard`}
eventId={{
cta: "clicked_get_scan_fourth",
field: "entered_email_address_fourth",
@ -253,7 +253,7 @@ export const View = (props: Props) => {
</p>
<SignUpForm
eligibleForPremium={props.eligibleForPremium}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard/`}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard`}
eventId={{
cta: "clicked_get_scan_last",
field: "entered_email_address_last",
@ -325,7 +325,7 @@ const Plans = (props: Props) => {
</b>
<SignUpForm
eligibleForPremium={props.eligibleForPremium}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard/`}
signUpCallbackUrl={`${process.env.SERVER_URL}/user/dashboard`}
eventId={{
cta: "intent_to_join_waitlist_third",
}}

Просмотреть файл

@ -18,7 +18,7 @@ import { View } from "./LandingView";
export default async function Page() {
const session = await getServerSession();
if (typeof session?.user.subscriber?.fxa_uid === "string") {
return redirect("/user/dashboard/");
return redirect("/user/dashboard");
}
const enabledFlags = await getEnabledFeatureFlags({ ignoreAllowlist: true });
const countryCode = getCountryCode(headers());

Просмотреть файл

@ -25,7 +25,7 @@ export const SignInButton = () => {
recordTelemetry("ctaButton", "click", {
button_id: "sign_in",
});
void signIn("fxa", { callbackUrl: "/user/dashboard/" });
void signIn("fxa", { callbackUrl: "/user/dashboard" });
}}
>
{l10n.getString("sign-in")}

Просмотреть файл

@ -113,7 +113,7 @@ export const UserMenu = (props: UserMenuProps) => {
>
<Link
className={styles.menuItemCta}
href="/user/settings/"
href="/user/settings"
ref={settingsItemRef}
title={l10n.getString("user-menu-settings-tooltip")}
>

Просмотреть файл

@ -22,7 +22,7 @@ export async function getExperiments(
}
try {
const features = await fetch(`${serverUrl}/v1/features/`, {
const features = await fetch(`${serverUrl}/v1/features`, {
headers: {
"Content-Type": "application/json",
},

Просмотреть файл

@ -170,7 +170,7 @@ export async function createProfile(
export async function getProfile(
profileId: number,
): Promise<ShowProfileResponse> {
const response: Response = await onerepFetch(`/profiles/${profileId}/`, {
const response: Response = await onerepFetch(`/profiles/${profileId}`, {
method: "GET",
});
if (!response.ok) {