add: user associations

This commit is contained in:
trisua 2025-06-05 20:56:56 -04:00
parent 50319f9124
commit 675b3e4ee6
11 changed files with 131 additions and 9 deletions

View file

@ -12,7 +12,7 @@ pub mod util;
pub mod channels;
use axum::{
routing::{any, delete, get, post},
routing::{any, delete, get, post, put},
Router,
};
use serde::Deserialize;
@ -207,6 +207,10 @@ pub fn routes() -> Router {
get(auth::profile::has_totp_enabled_request),
)
.route("/auth/user/me/seen", post(auth::profile::seen_request))
.route(
"/auth/user/me/append_associations",
put(auth::profile::append_associations_request),
)
.route("/auth/user/find/{id}", get(auth::profile::redirect_from_id))
.route(
"/auth/user/find_by_ip/{ip}",
@ -618,3 +622,8 @@ pub struct CreatePostDraft {
pub struct VoteInPoll {
pub option: PollOption,
}
#[derive(Deserialize)]
pub struct AppendAssociations {
pub tokens: Vec<String>,
}