Skip to content

Commit df49ffc

Browse files
authored
fix(admin): relax userId validation in gastown router for legacy oauth/* IDs (#3497)
1 parent e4ea364 commit df49ffc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/src/routers/admin/gastown-router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ export const adminGastownRouter = createTRPCRouter({
392392
* Calls: GET /api/users/:userId/towns (kiloAuthMiddleware, no ownership check)
393393
*/
394394
getUserTowns: adminProcedure
395-
.input(z.object({ userId: z.string().uuid() }))
395+
.input(z.object({ userId: z.string().min(1) }))
396396
.output(z.array(UserTownRecord))
397397
.query(({ input, ctx }) => {
398398
return gastownGet(ctx.user, `/api/users/${input.userId}/towns`, z.array(UserTownRecord));
@@ -403,7 +403,7 @@ export const adminGastownRouter = createTRPCRouter({
403403
* Calls: GET /api/users/:userId/towns/:townId/rigs for each town.
404404
*/
405405
getUserRigs: adminProcedure
406-
.input(z.object({ userId: z.string().uuid() }))
406+
.input(z.object({ userId: z.string().min(1) }))
407407
.output(z.array(UserRigRecord))
408408
.query(async ({ input, ctx }) => {
409409
const towns = await gastownGet(

0 commit comments

Comments
 (0)