add: journal entry context
This commit is contained in:
parent
e87ad74d43
commit
1a6b48078a
5 changed files with 57 additions and 3 deletions
|
@ -6,7 +6,9 @@ use axum::{
|
|||
routing::{delete, get, post},
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use tetratto_core::model::journal::{JournalPageReadAccess, JournalPageWriteAccess};
|
||||
use tetratto_core::model::journal::{
|
||||
JournalEntryContext, JournalPageReadAccess, JournalPageWriteAccess,
|
||||
};
|
||||
|
||||
pub fn routes() -> Router {
|
||||
Router::new()
|
||||
|
@ -36,6 +38,10 @@ pub fn routes() -> Router {
|
|||
"/entries/{id}/content",
|
||||
post(journal::entries::update_content_request),
|
||||
)
|
||||
.route(
|
||||
"/entries/{id}/context",
|
||||
post(journal::entries::update_context_request),
|
||||
)
|
||||
// auth
|
||||
// global
|
||||
.route("/auth/register", post(auth::register_request))
|
||||
|
@ -102,3 +108,8 @@ pub struct CreateJournalEntry {
|
|||
pub struct UpdateJournalEntryContent {
|
||||
pub content: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct UpdateJournalEntryContext {
|
||||
pub context: JournalEntryContext,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue