fix: registry list crash and logout 405
IHP NameSupport cannot parse trailing-underscore field names at runtime.
orderByAsc #label_ in all four registry list actions (and the API V2
equivalents) crashed the page with ParseErrorBundle. Changed to orderByAsc
#name which avoids the NameSupport conversion path entirely.
textField #label_ in the four registry form views has the same issue.
Replaced with a plain <input> element that reads entry.label_ directly.
Logout <a href={DeleteSessionAction}> sent GET but IHP requires DELETE.
IHP includes methodOverridePost middleware, so a POST form with
_method=DELETE handles this correctly.
Also corrected the seed admin-user migration hash from bcrypt to the
pwstore-fast format (sha256|17|...) that IHP actually uses.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
29f7895ce8
commit
6078c48289
9 changed files with 41 additions and 16 deletions
|
|
@ -16,21 +16,21 @@ instance Controller ApiV2RegistriesController where
|
|||
action ApiV2ListWidgetTypesAction = do
|
||||
types <- query @WidgetTypeRegistry
|
||||
|> filterWhere (#status, "active")
|
||||
|> orderByAsc #label_
|
||||
|> orderByAsc #name
|
||||
|> fetch
|
||||
renderJson $ map wtToJson types
|
||||
|
||||
action ApiV2ListEventTypesAction = do
|
||||
types <- query @EventTypeRegistry
|
||||
|> filterWhere (#status, "active")
|
||||
|> orderByAsc #label_
|
||||
|> orderByAsc #name
|
||||
|> fetch
|
||||
renderJson $ map etToJson types
|
||||
|
||||
action ApiV2ListAnnotationCategoriesAction = do
|
||||
cats <- query @AnnotationCategoryRegistry
|
||||
|> filterWhere (#status, "active")
|
||||
|> orderByAsc #label_
|
||||
|> orderByAsc #name
|
||||
|> fetch
|
||||
renderJson $ map acToJson cats
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ instance Controller TypeRegistriesController where
|
|||
|
||||
action WidgetTypeRegistryAction = do
|
||||
entries <- query @WidgetTypeRegistry
|
||||
|> orderByAsc #label_
|
||||
|> orderByAsc #name
|
||||
|> fetch
|
||||
hubs <- query @Hub |> fetch
|
||||
render WidgetTypesView { entries, hubs }
|
||||
|
|
@ -83,7 +83,7 @@ instance Controller TypeRegistriesController where
|
|||
|
||||
action EventTypeRegistryAction = do
|
||||
entries <- query @EventTypeRegistry
|
||||
|> orderByAsc #label_
|
||||
|> orderByAsc #name
|
||||
|> fetch
|
||||
hubs <- query @Hub |> fetch
|
||||
render EventTypesView { entries, hubs }
|
||||
|
|
@ -149,7 +149,7 @@ instance Controller TypeRegistriesController where
|
|||
|
||||
action AnnotationCategoryRegistryAction = do
|
||||
entries <- query @AnnotationCategoryRegistry
|
||||
|> orderByAsc #label_
|
||||
|> orderByAsc #name
|
||||
|> fetch
|
||||
hubs <- query @Hub |> fetch
|
||||
render AnnotationCategoriesView { entries, hubs }
|
||||
|
|
@ -215,7 +215,7 @@ instance Controller TypeRegistriesController where
|
|||
|
||||
action PolicyScopeRegistryAction = do
|
||||
entries <- query @PolicyScopeRegistry
|
||||
|> orderByAsc #label_
|
||||
|> orderByAsc #name
|
||||
|> fetch
|
||||
hubs <- query @Hub |> fetch
|
||||
render PolicyScopesView { entries, hubs }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue