From 8cde452fca207d41e696c0a8c56414c067b817c6 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 25 Jan 2024 10:45:42 -0500 Subject: [PATCH] Add a comment to clarify the ban expires field. (#4400) * Add a comment to clarify the ban expires field. * Add comment about simpler client implementation. * Better language. --- crates/api_common/src/community.rs | 3 +++ crates/api_common/src/person.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/crates/api_common/src/community.rs b/crates/api_common/src/community.rs index 1f4a94636..8801f67fb 100644 --- a/crates/api_common/src/community.rs +++ b/crates/api_common/src/community.rs @@ -97,6 +97,9 @@ pub struct BanFromCommunity { pub ban: bool, pub remove_data: Option, pub reason: Option, + /// A time that the ban will expire, in unix epoch seconds. + /// + /// An i64 unix timestamp is used for a simpler API client implementation. pub expires: Option, } diff --git a/crates/api_common/src/person.rs b/crates/api_common/src/person.rs index 328674e1f..af24a84cb 100644 --- a/crates/api_common/src/person.rs +++ b/crates/api_common/src/person.rs @@ -214,6 +214,9 @@ pub struct BanPerson { /// Optionally remove all their data. Useful for new troll accounts. pub remove_data: Option, pub reason: Option, + /// A time that the ban will expire, in unix epoch seconds. + /// + /// An i64 unix timestamp is used for a simpler API client implementation. pub expires: Option, }