Crazy-xyr commented on code in PR #12624:
URL: https://github.com/apache/apisix/pull/12624#discussion_r2368352737
##########
apisix/admin/utils.lua:
##########
@@ -104,8 +104,9 @@ function _M.decrypt_params(decrypt_func, body, schema_type)
end
-- metadata
- if schema_type == core.schema.TYPE_METADATA then
- local conf = body.node and body.node.value
+ local conf = body.node and body.node.value
+
+ if conf and schema_type == core.schema.TYPE_METADATA then
decrypt_func(conf.id, conf, schema_type)
Review Comment:
conf.id is guaranteed to exist
https://github.com/apache/apisix/blob/0151d9e35bba63d7c316187272d88e19db0be634/apisix/admin/resource.lua#L289-L296
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]