feat(web client): content pages
This commit is contained in:
parent
58f5722551
commit
6fd3499d7b
15 changed files with 312 additions and 11 deletions
|
|
@ -63,15 +63,18 @@ pub struct AppState {
|
|||
pub db: Pool,
|
||||
/// SMTP mailer for email verification and password reset.
|
||||
pub mailer: Mailer,
|
||||
/// Directory containing static content pages as `{slug}/{lang}.md` files.
|
||||
pub pages_dir: String,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
pub fn new(db: Pool, mailer: Mailer) -> Self {
|
||||
pub fn new(db: Pool, mailer: Mailer, pages_dir: String) -> Self {
|
||||
Self {
|
||||
rooms: Mutex::new(HashMap::new()),
|
||||
configs: RwLock::new(HashMap::new()),
|
||||
db,
|
||||
mailer,
|
||||
pages_dir,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue