feat(auth): kayıt, giriş, çıkış ve oturum (argon2 + JWT httpOnly cookie)
- Kayıt: kullanıcı + hane + örnek kategori/ödeme türü tek transaction'da - Giriş: beni hatırla (30 gün / oturum), e-posta başına deneme sınırı - AuthUser extractor: cookie'deki JWT'yi doğrular - ValidJson: JSON + doğrulama, Türkçe hata mesajları - api.http: auth istekleri eklendi - Birim testleri: şifre, JWT, deneme sınırı, seed (11 test) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//! `households` koleksiyonu (DATA_MODEL.md §3.2).
|
||||
|
||||
use mongodb::bson::{Document, doc};
|
||||
use serde::Deserialize;
|
||||
|
||||
/// Veritabanından okunan hane (yalnızca ihtiyaç duyulan alanlar).
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct Household {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
/// Yeni hane için varsayılan ayarlar.
|
||||
pub fn default_settings() -> Document {
|
||||
doc! {
|
||||
"currency": "TRY",
|
||||
"budget_split_pct": { "needs": 50, "wants": 30, "culture": 10, "unexpected": 10 },
|
||||
"budget_suggestion": "default",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user