mirror of
https://github.com/documenso/documenso.git
synced 2026-08-24 07:12:23 +10:00
chore(trpc): type-safety cleanups across routers
This commit is contained in:
@@ -92,7 +92,7 @@ export const profileRouter = router({
|
||||
|
||||
const parsedTeamId = teamId ? Number(teamId) : null;
|
||||
|
||||
if (typeof parsedTeamId === 'number') {
|
||||
if (parsedTeamId !== null) {
|
||||
if (Number.isNaN(parsedTeamId) || parsedTeamId <= 0) {
|
||||
throw new AppError(AppErrorCode.INVALID_BODY, {
|
||||
message: 'Invalid team ID provided',
|
||||
|
||||
Reference in New Issue
Block a user