api: syslog: fix api macro to return array instead of object.

The implementation already returns Vec, so this change is to generate
correct api documentation.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer 2024-05-15 12:17:03 +02:00
parent 6d4b380c3d
commit 00ef50146c

View File

@ -119,8 +119,10 @@ fn dump_journal(
}, },
}, },
returns: { returns: {
type: Object, type: Array,
description: "Returns a list of syslog entries.", description: "Returns a list of syslog entries.",
items: {
description: "Syslog line with line number.",
properties: { properties: {
n: { n: {
type: Integer, type: Integer,
@ -131,6 +133,7 @@ fn dump_journal(
description: "Line text.", description: "Line text.",
} }
}, },
}
}, },
access: { access: {
permission: &Permission::Privilege(&["system", "log"], PRIV_SYS_AUDIT, false), permission: &Permission::Privilege(&["system", "log"], PRIV_SYS_AUDIT, false),