diff options
| author | Christine Dodrill <me@christine.website> | 2021-01-16 21:38:22 -0500 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2021-01-16 21:38:22 -0500 |
| commit | 4bcc848bb178d9e4372ba13b750d620cabc2a9ac (patch) | |
| tree | e2a97a5a03c934de6307b3d543d5f4b249675ce7 /lib/mi | |
| parent | 17af42bc698237d1560b8add144641ae3950b469 (diff) | |
| download | xesite-4bcc848bb178d9e4372ba13b750d620cabc2a9ac.tar.xz xesite-4bcc848bb178d9e4372ba13b750d620cabc2a9ac.zip | |
move poking services into app boot after systemd notify
Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to 'lib/mi')
| -rw-r--r-- | lib/mi/src/lib.rs | 12 |
1 files changed, 11 insertions, 1 deletions
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<Vec<WebMention>> { 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)] |
