Skip to content

Commit

Permalink
Merge pull request #311 from frouriojs/develop
Browse files Browse the repository at this point in the history
release v1.2.2
  • Loading branch information
solufa authored Jan 17, 2025
2 parents c8db031 + 3624a0f commit b908321
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions servers/all/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, Fas

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down Expand Up @@ -342,7 +342,7 @@ export default (fastify: FastifyInstance, options: FrourioOptions = {}) => {
const controller_1pjj81w = controllerFn_1pjj81w(fastify);
const controller_iyk7j5 = controllerFn_iyk7j5(fastify);

fastify.register(multipart, { attachFieldsToBody: true, limits: { fileSize: 1024 ** 3 }, ...options.multipart });
fastify.register(multipart, { limits: { fileSize: 1024 ** 3 }, ...options.multipart, attachFieldsToBody: true });

fastify.get(
basePath || '/',
Expand Down
2 changes: 1 addition & 1 deletion servers/minimum/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, onR

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down
2 changes: 1 addition & 1 deletion servers/noMulter/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, Fas

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down
4 changes: 2 additions & 2 deletions servers/noTypedParams/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, Rou

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down Expand Up @@ -202,7 +202,7 @@ export default (fastify: FastifyInstance, options: FrourioOptions = {}) => {
const controller_1bjhajh = controllerFn_1bjhajh(fastify);
const controller_g6e9u2 = controllerFn_g6e9u2(fastify);

fastify.register(multipart, { attachFieldsToBody: true, limits: { fileSize: 1024 ** 3 }, ...options.multipart });
fastify.register(multipart, { limits: { fileSize: 1024 ** 3 }, ...options.multipart, attachFieldsToBody: true });

fastify.get(
basePath || '/',
Expand Down
4 changes: 2 additions & 2 deletions servers/noValidator/$server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type { FastifyInstance, RouteHandlerMethod, preValidationHookHandler, Fas

export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};

type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down Expand Up @@ -233,7 +233,7 @@ export default (fastify: FastifyInstance, options: FrourioOptions = {}) => {
const controller_g6e9u2 = controllerFn_g6e9u2(fastify);
const controller_1y88f1f = controllerFn_1y88f1f(fastify);

fastify.register(multipart, { attachFieldsToBody: true, limits: { fileSize: 1024 ** 3 }, ...options.multipart });
fastify.register(multipart, { limits: { fileSize: 1024 ** 3 }, ...options.multipart, attachFieldsToBody: true });

fastify.get(
basePath || '/',
Expand Down
4 changes: 2 additions & 2 deletions src/buildServerFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ${imports}import type { FastifyInstance, RouteHandlerMethod, preValidationHookHa
export type FrourioOptions = {
basePath?: string;
multipart?: FastifyMultipartAttachFieldsToBodyOptions;
multipart?: Omit<FastifyMultipartAttachFieldsToBodyOptions, 'attachFieldsToBody'>;
};
type HttpStatusNoOk = 301 | 302 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 409 | 500 | 501 | 502 | 503 | 504 | 505;
Expand Down Expand Up @@ -369,7 +369,7 @@ export default (fastify: FastifyInstance, options: FrourioOptions = {}) => {
${consts}
${
hasMultipart
? ' fastify.register(multipart, { attachFieldsToBody: true, limits: { fileSize: 1024 ** 3 }, ...options.multipart });\n\n'
? ' fastify.register(multipart, { limits: { fileSize: 1024 ** 3 }, ...options.multipart, attachFieldsToBody: true });\n\n'
: ''
}${controllers}
return fastify;
Expand Down

0 comments on commit b908321

Please sign in to comment.