From 4bcc848bb178d9e4372ba13b750d620cabc2a9ac Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 16 Jan 2021 21:38:22 -0500 Subject: move poking services into app boot after systemd notify Signed-off-by: Christine Dodrill --- lib/mi/src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/mi/src') diff --git a/lib/mi/src/lib.rs b/lib/mi/src/lib.rs index ec9d459..0e19bec 100644 --- a/lib/mi/src/lib.rs +++ b/lib/mi/src/lib.rs @@ -34,7 +34,7 @@ impl Client { }) } - #[instrument(skip(self))] + #[instrument(skip(self), err)] pub async fn mentioners(&self, url: String) -> Result> { Ok(self .cli @@ -46,6 +46,16 @@ impl Client { .json() .await?) } + + #[instrument(skip(self), err)] + pub async fn refresh(&self) -> Result<()> { + self.cli + .post("https://mi.within.website/api/blog/refresh") + .send() + .await? + .error_for_status()?; + Ok(()) + } } #[derive(Debug, Deserialize, Eq, PartialEq, Clone)] -- cgit v1.2.3