Skip to content

Commit

Permalink
fix: fix issue with takingnames integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
zicklag committed Oct 15, 2024
1 parent 4d3fae9 commit 7543543
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/routes/(app)/[username]/settings/domain/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const load: PageServerLoad = async ({ fetch, params, request, url }) => {
};

export const actions = {
default: async ({ request, fetch }) => {
default: async ({ request, fetch, url }) => {
try {
let { sessionInfo } = await getSession(fetch, request);
if (!sessionInfo) {
Expand All @@ -43,6 +43,10 @@ export const actions = {
} else {
await setCustomDomain(sessionInfo.user_id, undefined);
}

const newUrl = new URL(url);
newUrl.search = '';
return redirect(302, newUrl);
} catch (e) {
return fail(400, { error: `Error updating domain: ${e}` });
}
Expand Down

0 comments on commit 7543543

Please sign in to comment.