Fix type errors and set PM2 port to 3111
- page.tsx: type the search filter as Where - PastorsTable.tsx: narrow action result before setError - seed.ts: tag ids are numbers on SQLite - ecosystem: PORT 3111 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
57c5594963
commit
db9eb8a304
|
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
env: {
|
||||
NODE_ENV: 'production',
|
||||
NODE_OPTIONS: '--no-deprecation',
|
||||
PORT: 3001,
|
||||
PORT: 3111,
|
||||
},
|
||||
|
||||
// Logs (relative to cwd). Create ./logs or change these paths.
|
||||
|
|
|
|||
|
|
@ -183,10 +183,10 @@ function PastorModal({ pastor, onClose }: { pastor: PastorRow | null; onClose: (
|
|||
router.refresh()
|
||||
onClose()
|
||||
} else {
|
||||
setError(
|
||||
('error' in res && res.error) ||
|
||||
(isCreate ? 'No se pudo crear el pastor.' : 'No se pudieron guardar los cambios.'),
|
||||
)
|
||||
const fallback = isCreate
|
||||
? 'No se pudo crear el pastor.'
|
||||
: 'No se pudieron guardar los cambios.'
|
||||
setError('error' in res && typeof res.error === 'string' ? res.error : fallback)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getPayload } from 'payload'
|
||||
import { getPayload, type Where } from 'payload'
|
||||
import React from 'react'
|
||||
|
||||
import config from '@/payload.config'
|
||||
|
|
@ -41,7 +41,7 @@ export default async function HomePage({
|
|||
|
||||
const payload = await getPayload({ config: await config })
|
||||
|
||||
const where = search
|
||||
const where: Where = search
|
||||
? {
|
||||
or: [
|
||||
{ name: { like: search } },
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ for (const post of samplePosts) {
|
|||
excerpt: post.excerpt,
|
||||
status: 'published',
|
||||
publishedDate: new Date().toISOString(),
|
||||
tags: post.tags as (number | string)[],
|
||||
tags: post.tags as number[],
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue