Enrich external API failure audit metadata
This commit is contained in:
@@ -325,11 +325,15 @@ fn validate_admin_work_visibility(
|
||||
) -> Result<(String, String, bool), AppError> {
|
||||
let source_type = payload.source_type.trim().to_string();
|
||||
if source_type.is_empty() {
|
||||
return Err(AppError::from_status(StatusCode::BAD_REQUEST).with_message("sourceType 不能为空"));
|
||||
return Err(
|
||||
AppError::from_status(StatusCode::BAD_REQUEST).with_message("sourceType 不能为空")
|
||||
);
|
||||
}
|
||||
let profile_id = payload.profile_id.trim().to_string();
|
||||
if profile_id.is_empty() {
|
||||
return Err(AppError::from_status(StatusCode::BAD_REQUEST).with_message("profileId 不能为空"));
|
||||
return Err(
|
||||
AppError::from_status(StatusCode::BAD_REQUEST).with_message("profileId 不能为空")
|
||||
);
|
||||
}
|
||||
Ok((source_type, profile_id, payload.visible))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user