Skip to content

Commit

Permalink
Add coaching_sessions as a schema for RAPIdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jhodapp committed Oct 26, 2024
1 parent dec9590 commit a92694f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions entity/src/coaching_sessions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize, ToSchema)]
#[schema(as = entity::coaching_sessions::Model)]
#[sea_orm(schema_name = "refactor_platform", table_name = "coaching_sessions")]
pub struct Model {
#[sea_orm(primary_key)]
Expand Down
3 changes: 1 addition & 2 deletions entity_api/src/coaching_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ mod tests {
.append_query_results(vec![vec![coaching_session_model.clone()]])
.into_connection();

let coaching_session =
create(&db, coaching_session_model.clone().into()).await?;
let coaching_session = create(&db, coaching_session_model.clone().into()).await?;

assert_eq!(coaching_session.id, coaching_session_model.id);

Expand Down
3 changes: 1 addition & 2 deletions web/src/controller/coaching_session_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ pub async fn create(
);

let coaching_session =
CoachingSessionApi::create(app_state.db_conn_ref(), coaching_sessions_model)
.await?;
CoachingSessionApi::create(app_state.db_conn_ref(), coaching_sessions_model).await?;

debug!("New Coaching Session: {:?}", coaching_session);

Expand Down

0 comments on commit a92694f

Please sign in to comment.