A LOT of stuff
All checks were successful
Build and Test / account (push) Successful in 7m48s

Basically I removed all the warnings, removed some old APIs no longer in use, added cert verification to DB, im just cool like that.
This commit is contained in:
red binder 2026-04-27 16:37:54 +02:00
commit 5a8e61c255
18 changed files with 363 additions and 254 deletions

View file

@ -1,4 +1,4 @@
use chrono::{DateTime, Duration, NaiveDateTime, Utc};
use chrono::{Duration, NaiveDateTime, Utc};
use rocket::{get, State};
use rocket::serde::json::Json;
use serde::Serialize;
@ -8,7 +8,7 @@ use crate::nnid::oauth::generate_token::token_type::AUTH_TOKEN;
use crate::Pool;
#[derive(Serialize)]
struct TokenData{
pub struct TokenData{
token: String,
expiry: NaiveDateTime
}
@ -17,8 +17,6 @@ struct TokenData{
pub async fn generate_token(pool: &State<Pool>, auth: Auth<false>) -> Json<TokenData>{
let pool = pool.inner();
Json(
TokenData{
expiry: Utc::now().naive_utc() + Duration::hours(1),

View file

@ -1,9 +1,9 @@
use rocket::{get, State};
use rocket::serde::json::Json;
use serde::de::IntoDeserializer;
// use serde::de::IntoDeserializer;
use sqlx::query;
use crate::account::account::Auth;
use crate::nnid::people::{build_profile, GetOwnProfileData};
// use crate::account::account::Auth;
// use crate::nnid::people::{build_profile, GetOwnProfileData};
use crate::Pool;

View file

@ -5,6 +5,6 @@ use crate::nnid::people::{build_profile, GetOwnProfileData};
use crate::Pool;
#[get("/api/v2/users/@me/profile")]
pub async fn get_own_profile(pool: &State<Pool>, auth: Auth<true>) -> Json<GetOwnProfileData> {
pub async fn get_own_profile(_pool: &State<Pool>, auth: Auth<true>) -> Json<GetOwnProfileData> {
Json(build_profile(auth.into()))
}