chore!: admin now takes a client side custom property and custom is server only (#5926)
This commit is contained in:
@@ -12,7 +12,7 @@ import { createClientFieldConfigs } from '../../fields/config/client.js'
|
||||
|
||||
export type ServerOnlyGlobalProperties = keyof Pick<
|
||||
SanitizedGlobalConfig,
|
||||
'access' | 'admin' | 'endpoints' | 'fields' | 'hooks'
|
||||
'access' | 'admin' | 'custom' | 'endpoints' | 'fields' | 'hooks'
|
||||
>
|
||||
export type ServerOnlyGlobalAdminProperties = keyof Pick<
|
||||
SanitizedGlobalConfig['admin'],
|
||||
@@ -46,6 +46,7 @@ export const createClientGlobalConfig = ({
|
||||
'hooks',
|
||||
'access',
|
||||
'endpoints',
|
||||
'custom',
|
||||
// `admin` is handled separately
|
||||
]
|
||||
|
||||
@@ -55,12 +56,6 @@ export const createClientGlobalConfig = ({
|
||||
}
|
||||
})
|
||||
|
||||
if ('custom' in sanitized && sanitized.custom) {
|
||||
if ('server' in sanitized.custom && sanitized.custom.server) {
|
||||
delete sanitized.custom.server
|
||||
}
|
||||
}
|
||||
|
||||
if ('admin' in sanitized) {
|
||||
sanitized.admin = { ...sanitized.admin }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user