인기 페이지 통계와 추천 사이트 메타데이터 추가 v1.5.9
This commit is contained in:
@@ -45,6 +45,8 @@ export default defineEventHandler(async (event) => {
|
||||
id: row.id,
|
||||
label: row.label.trim(),
|
||||
url: row.url.trim(),
|
||||
descriptionText: row.descriptionText.trim(),
|
||||
thumbnailUrl: row.thumbnailUrl.trim(),
|
||||
location: row.location,
|
||||
sortOrder: row.sortOrder,
|
||||
isVisible: true,
|
||||
@@ -70,10 +72,16 @@ export default defineEventHandler(async (event) => {
|
||||
} catch (err) {
|
||||
const msg = err?.message != null ? String(err.message) : String(err)
|
||||
const code = err?.code != null ? String(err.code) : ''
|
||||
if (msg.includes('parent_id') || msg.includes('is_folder') || code === '42703') {
|
||||
if (
|
||||
msg.includes('parent_id') ||
|
||||
msg.includes('is_folder') ||
|
||||
msg.includes('description_text') ||
|
||||
msg.includes('thumbnail_url') ||
|
||||
code === '42703'
|
||||
) {
|
||||
throw createError({
|
||||
statusCode: 503,
|
||||
message: 'DB에 navigation_items 확장 컬럼이 없습니다. 프로젝트 루트에서 npm run db:migrate:dev 로 017_navigation_hierarchy.sql을 적용한 뒤 다시 저장하세요.'
|
||||
message: 'DB에 navigation_items 확장 컬럼이 없습니다. 프로젝트 루트에서 npm run db:migrate:dev 로 최신 마이그레이션을 적용한 뒤 다시 저장하세요.'
|
||||
})
|
||||
}
|
||||
throw err
|
||||
|
||||
Reference in New Issue
Block a user