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: {
|
env: {
|
||||||
NODE_ENV: 'production',
|
NODE_ENV: 'production',
|
||||||
NODE_OPTIONS: '--no-deprecation',
|
NODE_OPTIONS: '--no-deprecation',
|
||||||
PORT: 3001,
|
PORT: 3111,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Logs (relative to cwd). Create ./logs or change these paths.
|
// Logs (relative to cwd). Create ./logs or change these paths.
|
||||||
|
|
|
||||||
|
|
@ -183,10 +183,10 @@ function PastorModal({ pastor, onClose }: { pastor: PastorRow | null; onClose: (
|
||||||
router.refresh()
|
router.refresh()
|
||||||
onClose()
|
onClose()
|
||||||
} else {
|
} else {
|
||||||
setError(
|
const fallback = isCreate
|
||||||
('error' in res && res.error) ||
|
? 'No se pudo crear el pastor.'
|
||||||
(isCreate ? 'No se pudo crear el pastor.' : 'No se pudieron guardar los cambios.'),
|
: '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 React from 'react'
|
||||||
|
|
||||||
import config from '@/payload.config'
|
import config from '@/payload.config'
|
||||||
|
|
@ -41,7 +41,7 @@ export default async function HomePage({
|
||||||
|
|
||||||
const payload = await getPayload({ config: await config })
|
const payload = await getPayload({ config: await config })
|
||||||
|
|
||||||
const where = search
|
const where: Where = search
|
||||||
? {
|
? {
|
||||||
or: [
|
or: [
|
||||||
{ name: { like: search } },
|
{ name: { like: search } },
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ for (const post of samplePosts) {
|
||||||
excerpt: post.excerpt,
|
excerpt: post.excerpt,
|
||||||
status: 'published',
|
status: 'published',
|
||||||
publishedDate: new Date().toISOString(),
|
publishedDate: new Date().toISOString(),
|
||||||
tags: post.tags as (number | string)[],
|
tags: post.tags as number[],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue