Skip to content

Commit

Permalink
feat(gateway): don't deduplicate resource list
Browse files Browse the repository at this point in the history
  • Loading branch information
oddgrd committed Oct 23, 2023
1 parent faf1961 commit 13a9e85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions common/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use strum::{Display, EnumString};
#[cfg(feature = "openapi")]
use utoipa::ToSchema;

#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "openapi", derive(ToSchema))]
#[cfg_attr(feature = "openapi", schema(as = shuttle_common::database::Type))]
Expand All @@ -14,7 +14,7 @@ pub enum Type {
Shared(SharedEngine),
}

#[derive(Clone, Copy, Debug, Deserialize, Display, Serialize, EnumString, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Debug, Deserialize, Display, Serialize, EnumString, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
#[strum(serialize_all = "lowercase")]
#[cfg_attr(feature = "openapi", derive(ToSchema))]
Expand All @@ -24,7 +24,7 @@ pub enum AwsRdsEngine {
MariaDB,
}

#[derive(Clone, Copy, Debug, Deserialize, Display, Serialize, EnumString, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Debug, Deserialize, Display, Serialize, EnumString, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
#[strum(serialize_all = "lowercase")]
#[cfg_attr(feature = "openapi", derive(ToSchema))]
Expand Down
2 changes: 1 addition & 1 deletion common/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct Response {
pub data: Value,
}

#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq, Hash)]
#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "lowercase")]
#[cfg_attr(feature = "openapi", derive(ToSchema))]
#[cfg_attr(feature = "openapi", schema(as = shuttle_common::resource::Type))]
Expand Down
3 changes: 0 additions & 3 deletions gateway/src/api/latest.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::collections::HashSet;
use std::io::Cursor;
use std::net::SocketAddr;
use std::ops::Sub;
Expand Down Expand Up @@ -373,8 +372,6 @@ async fn delete_project(
)
})
.map(|resource| resource.r#type.to_string())
.collect::<HashSet<_>>()
.into_iter()
.collect::<Vec<_>>();

if !resources.is_empty() {
Expand Down

0 comments on commit 13a9e85

Please sign in to comment.