mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
throw error if sort column not exists
This commit is contained in:
parent
6d0dcee488
commit
42749c5a32
1 changed files with 6 additions and 1 deletions
|
|
@ -148,8 +148,13 @@ const getColumnName = (field: string) => {
|
|||
case 'updated':
|
||||
case 'published':
|
||||
return `${lowerCaseField}_at`
|
||||
default:
|
||||
case 'author':
|
||||
case 'title':
|
||||
case 'description':
|
||||
case 'note':
|
||||
return lowerCaseField
|
||||
default:
|
||||
throw new Error(`Unexpected field: ${field}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue