feat: get bal owner book instances endpoint
This commit is contained in:
parent
aff6c429ce
commit
fc494d2135
5 changed files with 52 additions and 12 deletions
|
|
@ -57,7 +57,7 @@ pub struct BalCreateParams {
|
|||
request_body = BalCreateParams,
|
||||
security(("jwt" = [])),
|
||||
responses(
|
||||
(status = OK, body = bal::Model, description = "Successfully created BAL"),
|
||||
(status = CREATED, body = bal::Model, description = "Successfully created BAL"),
|
||||
),
|
||||
summary = "Create a new bal",
|
||||
description = "Create a new bal",
|
||||
|
|
@ -80,7 +80,7 @@ pub async fn create_bal(
|
|||
log::error!(target: "api", "Error while inserting new bal: {:#?}", e);
|
||||
(StatusCode::BAD_REQUEST, Json(None))
|
||||
},
|
||||
Ok(res) => (StatusCode::OK, Json(Some(res.try_into_model().expect("All fields should be set once the bal is saved"))))
|
||||
Ok(res) => (StatusCode::CREATED, Json(Some(res.try_into_model().expect("All fields should be set once the bal is saved"))))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue