aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/routes/api')
-rw-r--r--server/src/routes/api/mod.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/server/src/routes/api/mod.rs b/server/src/routes/api/mod.rs
index 87ed0e9..214c5de 100644
--- a/server/src/routes/api/mod.rs
+++ b/server/src/routes/api/mod.rs
@@ -9,7 +9,7 @@ use super::ui::{
};
use crate::database::Database;
use anyhow::{anyhow, Context};
-use jellycommon::{user::UserPermission, Node};
+use jellycommon::{user::CreateSessionParams, Node};
use rocket::{
get,
http::MediaType,
@@ -20,9 +20,8 @@ use rocket::{
serde::json::Json,
Request, State,
};
-use serde::Deserialize;
use serde_json::{json, Value};
-use std::{collections::HashSet, ops::Deref};
+use std::ops::Deref;
#[get("/api")]
pub fn r_api_root() -> Redirect {
@@ -34,14 +33,6 @@ pub fn r_api_version() -> &'static str {
"2"
}
-#[derive(Deserialize)]
-pub struct CreateSessionParams {
- username: String,
- password: String,
- expire: Option<i64>,
- drop_permissions: Option<HashSet<UserPermission>>,
-}
-
#[post("/api/create_session", data = "<data>")]
pub fn r_api_account_login(
database: &State<Database>,