aboutsummaryrefslogtreecommitdiff
path: root/src/structures.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-24 00:06:59 +0000
committerFuwn <[email protected]>2022-03-24 00:06:59 +0000
commit64d31d0c0226141db72b5907ee21792dd3e92dfa (patch)
treed06942db46df80474b77de6bfc993cd99d6af1bf /src/structures.rs
parentfeat(api): /me route (diff)
downloadapi-worker-64d31d0c0226141db72b5907ee21792dd3e92dfa.tar.xz
api-worker-64d31d0c0226141db72b5907ee21792dd3e92dfa.zip
feat: cache github api
This commit allows The Senpy Club API to cache GitHub's API response, refreshing the cache every fifty accesses. This commit also gets rid of a few dependencies which were replaced by their standard library counterparts.
Diffstat (limited to 'src/structures.rs')
-rw-r--r--src/structures.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/structures.rs b/src/structures.rs
index 3e9b7bc..4c59d51 100644
--- a/src/structures.rs
+++ b/src/structures.rs
@@ -20,7 +20,7 @@
use serde_derive::{Deserialize, Serialize};
-#[derive(Serialize, Deserialize)]
+#[derive(Serialize, Deserialize, Clone)]
pub struct GitHubAPIResponse {
pub sha: String,
pub url: String,
@@ -38,7 +38,7 @@ impl Default for GitHubAPIResponse {
}
}
-#[derive(Serialize, Deserialize, Default)]
+#[derive(Serialize, Deserialize, Default, Clone)]
pub struct GitHubAPIResponseTree {
pub path: String,
pub mode: String,