Use PremiumTextField in v2 (#4577)
* Use PremiumTextField in v2 * Fix tests * Fix Lint * Fix TS error * Fixes * Fix username input in self hosted scenario * Fix type error * Fix Tests * Fix username text field test Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
7 files changed
+72
-55
No files matched your search
@@ -25,7 +25,6 @@ export enum UsernameChangeStatusEnum {
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
if (req.method === "GET") {
|
||||
const userId = req.session?.user.id;
|
||||
|
||||
let { intentUsername = null } = req.query;
|
||||
const { action, callbackUrl } = req.query;
|
||||
if (!userId || !intentUsername) {
|
||||
@@ -36,7 +35,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
intentUsername = intentUsername[0];
|
||||
}
|
||||
const customerId = await getStripeCustomerIdFromUserId(userId);
|
||||
|
||||
if (!customerId) {
|
||||
res.status(404).json({ message: "Missing customer id" });
|
||||
return;
|
||||
|
||||
@@ -73,6 +73,7 @@ async function getUserFromSession({
|
||||
locale: true,
|
||||
timeFormat: true,
|
||||
trialEndsAt: true,
|
||||
metadata: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -179,6 +179,7 @@ const loggedInViewerRouter = createProtectedRouter()
|
||||
weekStart: user.weekStart,
|
||||
theme: user.theme,
|
||||
hideBranding: user.hideBranding,
|
||||
metadata: user.metadata,
|
||||
};
|
||||
},
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user