mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
server: fix fromJSON for RemoteSchemaPermsCtx
GitOrigin-RevId: a0a6d50a39ffbc7fab0a303b50c3e2c485954773
This commit is contained in:
parent
f998fc089e
commit
78785ae513
@ -200,11 +200,8 @@ data RemoteSchemaPermsCtx
|
||||
deriving (Show, Eq)
|
||||
|
||||
instance J.FromJSON RemoteSchemaPermsCtx where
|
||||
parseJSON = J.withText "RemoteSchemaPermsCtx" $ \t ->
|
||||
case T.toLower t of
|
||||
"true" -> pure RemoteSchemaPermsEnabled
|
||||
"false" -> pure RemoteSchemaPermsDisabled
|
||||
_ -> fail "enable_remote_schema_permissions should be a boolean value"
|
||||
parseJSON = J.withBool "RemoteSchemaPermsCtx" $
|
||||
pure . bool RemoteSchemaPermsDisabled RemoteSchemaPermsEnabled
|
||||
|
||||
instance J.ToJSON RemoteSchemaPermsCtx where
|
||||
toJSON = \case
|
||||
|
Loading…
Reference in New Issue
Block a user