[WIP] Terms update support
This commit is contained in:
parent
43af786d16
commit
b81276dd18
6 changed files with 251 additions and 91 deletions
3
src/terms/terms_getter.rs
Normal file → Executable file
3
src/terms/terms_getter.rs
Normal file → Executable file
|
|
@ -2,7 +2,7 @@ use json::JsonValue::Object;
|
|||
|
||||
use crate::terms::doc::Doc;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum Type {
|
||||
EULA,
|
||||
TOS,
|
||||
|
|
@ -87,7 +87,6 @@ pub async fn get_newest_docs() -> Option<(Doc, Doc, Doc)> {
|
|||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn get_terms(terms_type: Type) -> Option<String> {
|
||||
let body = reqwest::get(format!(
|
||||
"https://legal.tensamin.net/api/text/{}/",
|
||||
|
|
|
|||
Loading…
Reference in a new issue