mirror of
https://github.com/flibusta-apps/users_settings_server.git
synced 2025-12-06 14:45:38 +01:00
Fixes
This commit is contained in:
@@ -28,7 +28,7 @@ async fn is_need_send(
|
||||
}
|
||||
|
||||
|
||||
async fn mark_sended(
|
||||
async fn mark_sent(
|
||||
Path(chat_id): Path<i64>,
|
||||
db: Database
|
||||
) -> impl IntoResponse {
|
||||
@@ -56,5 +56,5 @@ async fn mark_sended(
|
||||
pub fn get_router() -> Router {
|
||||
Router::new()
|
||||
.route("/:chat_id/is_need_send", get(is_need_send))
|
||||
.route("/:chat_id", post(mark_sended))
|
||||
.route("/:chat_id", post(mark_sent))
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
pub mod serializers;
|
||||
pub mod utils;
|
||||
|
||||
use axum::{Router, response::IntoResponse, routing::{get, post}, extract::{Query, Path, self}, Json, http::StatusCode};
|
||||
use axum::{Router, response::IntoResponse, routing::{get, post}, extract::{Query, Path}, Json, http::StatusCode};
|
||||
use crate::prisma::{user_settings, language_to_user, user_activity};
|
||||
|
||||
use self::{serializers::{UserDetail, CreateOrUpdateUserData}, utils::update_languages};
|
||||
@@ -73,7 +73,7 @@ async fn get_user(
|
||||
|
||||
async fn create_or_update_user(
|
||||
db: Database,
|
||||
extract::Json(data): extract::Json<CreateOrUpdateUserData>,
|
||||
Json(data): Json<CreateOrUpdateUserData>,
|
||||
) -> impl IntoResponse {
|
||||
let user = db.user_settings()
|
||||
.upsert(
|
||||
|
||||
Reference in New Issue
Block a user