mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
feat: add more api logs (#1870)
Adds more detailed API logging using Pino
This commit is contained in:
@ -23,9 +23,15 @@ export const profileRouter = router({
|
||||
});
|
||||
}),
|
||||
|
||||
getUser: adminProcedure.input(ZRetrieveUserByIdQuerySchema).query(async ({ input }) => {
|
||||
getUser: adminProcedure.input(ZRetrieveUserByIdQuerySchema).query(async ({ input, ctx }) => {
|
||||
const { id } = input;
|
||||
|
||||
ctx.logger.info({
|
||||
input: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
|
||||
return await getUserById({ id });
|
||||
}),
|
||||
|
||||
@ -53,6 +59,13 @@ export const profileRouter = router({
|
||||
.mutation(async ({ input, ctx }) => {
|
||||
const { bytes, teamId, organisationId } = input;
|
||||
|
||||
ctx.logger.info({
|
||||
input: {
|
||||
teamId,
|
||||
organisationId,
|
||||
},
|
||||
});
|
||||
|
||||
let target: SetAvatarImageOptions['target'] = {
|
||||
type: 'user',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user