diff options
Diffstat (limited to 'src/app/api/responses.rs')
| -rw-r--r-- | src/app/api/responses.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/api/responses.rs b/src/app/api/responses.rs index 7c871c37..3cfa1a5c 100644 --- a/src/app/api/responses.rs +++ b/src/app/api/responses.rs @@ -1,10 +1,10 @@ use crate::api::schema::{ErrorBody, ErrorResponse, ResponseResult, SuccessResponse}; -pub(super) fn encode_success(id: String, result: ResponseResult) -> String { +pub(crate) fn encode_success(id: String, result: ResponseResult) -> String { serde_json::to_string(&SuccessResponse { id, result }).unwrap() } -pub(super) fn encode_error(id: String, code: &str, message: impl Into<String>) -> String { +pub(crate) fn encode_error(id: String, code: &str, message: impl Into<String>) -> String { encode_error_body( id, ErrorBody { |
