fix(user): add integration_completed enum in metadata type (#3245)

This commit is contained in:
Apoorv Dixit
2024-01-05 14:10:26 +05:30
committed by GitHub
parent 11aeff53bf
commit 3ab71fbd5a
3 changed files with 7 additions and 12 deletions

View File

@ -91,21 +91,12 @@ pub async fn get_merchant_scoped_metadata_from_db(
org_id: String,
metadata_keys: Vec<DBEnum>,
) -> UserResult<Vec<DashboardMetadata>> {
match state
state
.store
.find_merchant_scoped_dashboard_metadata(&merchant_id, &org_id, metadata_keys)
.await
{
Ok(data) => Ok(data),
Err(e) => {
if e.current_context().is_db_not_found() {
return Ok(Vec::with_capacity(0));
}
Err(e
.change_context(UserErrors::InternalServerError)
.attach_printable("DB Error Fetching DashboardMetaData"))
}
}
.change_context(UserErrors::InternalServerError)
.attach_printable("DB Error Fetching DashboardMetaData")
}
pub async fn get_user_scoped_metadata_from_db(
state: &AppState,