diff options
author | metamuffin <metamuffin@disroot.org> | 2023-08-02 23:07:55 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-08-02 23:07:55 +0200 |
commit | 8e33fcdfbd9df042c0cfd8e9a2084993313961c9 (patch) | |
tree | 9b18183237177b6c2b7060140ed92e62581ab588 /server/src/routes/api | |
parent | c81d8bbfd46d53fba6e0086b5f859f8af8639f4a (diff) | |
download | jellything-8e33fcdfbd9df042c0cfd8e9a2084993313961c9.tar jellything-8e33fcdfbd9df042c0cfd8e9a2084993313961c9.tar.bz2 jellything-8e33fcdfbd9df042c0cfd8e9a2084993313961c9.tar.zst |
federated import works but relies on private data
Diffstat (limited to 'server/src/routes/api')
-rw-r--r-- | server/src/routes/api/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/src/routes/api/mod.rs b/server/src/routes/api/mod.rs index e74b134..cc87525 100644 --- a/server/src/routes/api/mod.rs +++ b/server/src/routes/api/mod.rs @@ -4,8 +4,6 @@ Copyright (C) 2023 metamuffin <metamuffin.org> */ -use std::ops::Deref; - use super::ui::{ account::{login_logic, LoginForm}, error::MyResult, @@ -22,6 +20,7 @@ use rocket::{ Request, State, }; use serde_json::{json, Value}; +use std::ops::Deref; #[get("/api")] pub fn r_api_root() -> Redirect { @@ -33,7 +32,7 @@ pub fn r_api_version() -> &'static str { "2" } -#[post("/api/account/login", data = "<data>")] +#[post("/api/create_session", data = "<data>")] pub fn r_api_account_login(database: &State<Database>, data: Json<LoginForm>) -> MyResult<Value> { let token = login_logic(database, &data.username, &data.password)?; Ok(json!(token)) |