Refactoring.

This commit is contained in:
John Livingston
2023-09-21 17:13:28 +02:00
parent 567a5e80ab
commit cc673bd3cb
4 changed files with 150 additions and 125 deletions

View File

@ -52,6 +52,9 @@ async function initConfigurationApiRouter (options: RegisterServerOptions, route
let channelOptions
try {
// Note: the front-end should do some input validation.
// If there is any invalid value, we just return a 400 error.
// The frontend should have prevented to post invalid data.
channelOptions = await sanitizeChannelConfigurationOptions(options, channelInfos.id, req.body)
} catch (err) {
logger.warn(err)