mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-02 08:07:40 -05:00
Trim custom url before saving to DB
Was causing 404 errors when users accidentally included white space after the custom url
This commit is contained in:
@@ -40,9 +40,11 @@ const profileHandler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
create: {
|
||||
user: { connect: { id: user.id } },
|
||||
...parsed.data,
|
||||
customUrlPath: parsed.data.customUrlPath?.trim(),
|
||||
},
|
||||
update: {
|
||||
...parsed.data,
|
||||
customUrlPath: parsed.data.customUrlPath?.trim(),
|
||||
},
|
||||
where: { userId: user.id },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user