Compare commits
3 Commits
fix/slug-l
...
feat/impro
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de6bb7572f | ||
|
|
c0aae5449f | ||
|
|
596f346181 |
@@ -39,7 +39,7 @@ export function LabelForm({
|
|||||||
labelPublicId: entityId,
|
labelPublicId: entityId,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: isEdit && !!entityId,
|
enabled: !!isEdit && entityId.length >= 12,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ export const boardRouter = createTRPCRouter({
|
|||||||
boardSlug: z
|
boardSlug: z
|
||||||
.string()
|
.string()
|
||||||
.min(3)
|
.min(3)
|
||||||
.max(24)
|
.max(60)
|
||||||
.regex(/^(?![-]+$)[a-zA-Z0-9-]+$/),
|
.regex(/^(?![-]+$)[a-zA-Z0-9-]+$/),
|
||||||
members: z.array(z.string().min(12)).optional(),
|
members: z.array(z.string().min(12)).optional(),
|
||||||
labels: z.array(z.string().min(12)).optional(),
|
labels: z.array(z.string().min(12)).optional(),
|
||||||
@@ -657,7 +657,7 @@ export const boardRouter = createTRPCRouter({
|
|||||||
boardSlug: z
|
boardSlug: z
|
||||||
.string()
|
.string()
|
||||||
.min(3)
|
.min(3)
|
||||||
.max(24)
|
.max(60)
|
||||||
.regex(/^(?![-]+$)[a-zA-Z0-9-]+$/),
|
.regex(/^(?![-]+$)[a-zA-Z0-9-]+$/),
|
||||||
boardPublicId: z.string().min(12),
|
boardPublicId: z.string().min(12),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -163,9 +163,9 @@ export const createTRPCRouter = t.router;
|
|||||||
|
|
||||||
export const createCallerFactory = t.createCallerFactory;
|
export const createCallerFactory = t.createCallerFactory;
|
||||||
|
|
||||||
const loggingMiddleware = t.middleware(async ({ path, type, next, ctx }) => {
|
const loggingMiddleware = t.middleware(async ({ path, type, next, ctx, getRawInput }) => {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
const result = await next();
|
const [result, input] = await Promise.all([next(), getRawInput().catch(() => undefined)]);
|
||||||
const duration = Date.now() - start;
|
const duration = Date.now() - start;
|
||||||
|
|
||||||
const { user, transport, requestId } = ctx as {
|
const { user, transport, requestId } = ctx as {
|
||||||
@@ -182,6 +182,7 @@ const loggingMiddleware = t.middleware(async ({ path, type, next, ctx }) => {
|
|||||||
duration,
|
duration,
|
||||||
userId: user?.id,
|
userId: user?.id,
|
||||||
...(isCloud && { email: user?.email }),
|
...(isCloud && { email: user?.email }),
|
||||||
|
input,
|
||||||
};
|
};
|
||||||
|
|
||||||
const label = transport === "rest" ? "REST" : "tRPC";
|
const label = transport === "rest" ? "REST" : "tRPC";
|
||||||
|
|||||||
Reference in New Issue
Block a user