mirror of
https://github.com/documenso/documenso.git
synced 2026-07-24 17:04:12 +10:00
feat: add envelopes api (#2105)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import type { DataTransformer } from '@trpc/server';
|
||||
import SuperJSON from 'superjson';
|
||||
|
||||
export const dataTransformer: DataTransformer = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
serialize: (data: any) => {
|
||||
if (data instanceof FormData) {
|
||||
return data;
|
||||
}
|
||||
|
||||
return SuperJSON.serialize(data);
|
||||
},
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
deserialize: (data: any) => {
|
||||
return SuperJSON.deserialize(data);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user