chore: files for running tests
This commit is contained in:
@@ -286,7 +286,7 @@ export const upsertRow = async <T extends TypeWithID>({
|
||||
message: req.t('error:valueMustBeUnique'),
|
||||
},
|
||||
],
|
||||
req?.t ?? i18nInit(req.payload.config.i18n).t,
|
||||
req.t,
|
||||
)
|
||||
: error
|
||||
}
|
||||
|
||||
@@ -38,8 +38,6 @@ export const APIKeyAuthentication =
|
||||
collection: collectionConfig.slug,
|
||||
depth: collectionConfig.auth.depth,
|
||||
overrideAccess: true,
|
||||
// TODO(JAMES)(REVIEW): had to remove with new pattern
|
||||
// req,
|
||||
where,
|
||||
})
|
||||
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import payload from '..'
|
||||
import loadConfig from '../config/load'
|
||||
|
||||
export const build = async (): Promise<void> => {
|
||||
await payload.init({
|
||||
disableDBConnect: true,
|
||||
disableOnInit: true,
|
||||
local: true,
|
||||
})
|
||||
const config = await loadConfig() // Will throw its own error if it fails
|
||||
|
||||
await payload.config.admin.bundler.build(payload.config)
|
||||
await config.admin.bundler.build(config)
|
||||
}
|
||||
|
||||
// when build.js is launched directly
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
'use client'
|
||||
|
||||
import React, { useEffect, useState } from 'react'
|
||||
|
||||
import type { User } from '../../packages/payload/src/auth'
|
||||
import type { UIField } from '../../packages/payload/src/fields/config/types'
|
||||
|
||||
import { useAuth } from '../../packages/payload/src/admin/components/utilities/Auth'
|
||||
import { useAuth } from '../../packages/ui'
|
||||
|
||||
export const AuthDebug: React.FC<UIField> = () => {
|
||||
const [state, setState] = useState<User | null | undefined>()
|
||||
|
||||
Reference in New Issue
Block a user