[WIP] Terms update support

This commit is contained in:
Alex-Emmet 2026-02-06 22:47:42 +01:00
commit b81276dd18
6 changed files with 251 additions and 91 deletions

3
src/terms/terms_getter.rs Normal file → Executable file
View 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/{}/",