Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 3x 6x 1x 5x 3x 2x | import type { AppSettings } from '@shared/types'
import { isPlainObject } from '@shared/settingsValidation'
export const getSettingsUpdatePatch = (request: unknown): Partial<AppSettings> => {
if (!isPlainObject(request)) {
throw new Error('settings.update request must be an object')
}
if (!isPlainObject(request.patch)) {
throw new Error('settings.update patch must be a plain object')
}
return request.patch as Partial<AppSettings>
}
|