Adds maxBytes and accepts options for workpad api routes that need it (#52189)
This commit is contained in:
parent
7e67d1f86c
commit
e6a0684469
|
@ -24,6 +24,12 @@ export function initializeCreateWorkpadRoute(deps: RouteInitializerDeps) {
|
|||
validate: {
|
||||
body: WorkpadSchema,
|
||||
},
|
||||
options: {
|
||||
body: {
|
||||
maxBytes: 26214400,
|
||||
accepts: ['application/json'],
|
||||
},
|
||||
},
|
||||
},
|
||||
catchErrorHandler(async (context, request, response) => {
|
||||
if (!request.body) {
|
||||
|
|
|
@ -64,6 +64,12 @@ export function initializeUpdateWorkpadRoute(deps: RouteInitializerDeps) {
|
|||
}),
|
||||
body: WorkpadSchema,
|
||||
},
|
||||
options: {
|
||||
body: {
|
||||
maxBytes: 26214400,
|
||||
accepts: ['application/json'],
|
||||
},
|
||||
},
|
||||
},
|
||||
catchErrorHandler(async (context, request, response) => {
|
||||
return workpadUpdateHandler(
|
||||
|
@ -84,6 +90,12 @@ export function initializeUpdateWorkpadRoute(deps: RouteInitializerDeps) {
|
|||
}),
|
||||
body: WorkpadSchema,
|
||||
},
|
||||
options: {
|
||||
body: {
|
||||
maxBytes: 26214400,
|
||||
accepts: ['application/json'],
|
||||
},
|
||||
},
|
||||
},
|
||||
catchErrorHandler(async (context, request, response) => {
|
||||
return workpadUpdateHandler(
|
||||
|
@ -111,6 +123,12 @@ export function initializeUpdateWorkpadAssetsRoute(deps: RouteInitializerDeps) {
|
|||
// unknowns and then validate in the handler
|
||||
body: schema.object({}, { allowUnknowns: true }),
|
||||
},
|
||||
options: {
|
||||
body: {
|
||||
maxBytes: 26214400,
|
||||
accepts: ['application/json'],
|
||||
},
|
||||
},
|
||||
},
|
||||
async (context, request, response) => {
|
||||
return workpadUpdateHandler(
|
||||
|
|
Loading…
Reference in a new issue