Skip to content

Commit

Permalink
Removing unnecessary dev comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunindia committed Oct 7, 2023
1 parent 29c2cb0 commit f999d73
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
1 change: 0 additions & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ impl Client {
pub async fn post<T: DeserializeOwned>(
&self,
endpoint: impl ToString,
//optional data, prevent serialization error. this currently fails if data is not provided or () is provided
data: Option<&impl Serialize>,
) -> Result<Response<T>, NovuError> {
if data.is_none() {
Expand Down
28 changes: 0 additions & 28 deletions src/environments.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
use serde::{Deserialize, Serialize};

/** Environment api response
* {
"data": {
"_id": "string",
"name": "string",
"_organizationId": "string",
"identifier": "string",
"apiKeys": [
{
"key": "string",
"_userId": "string"
}
],
"_parentId": "string"
}
}
*/
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Environment {
Expand All @@ -42,17 +25,6 @@ pub struct EnvironmentPayload {
pub parent_id: Option<String>,
}

/*
{
'name' => 'Local', # optional
'identifier' => 'local', # optional
'parentId' => '7789', # optional
'dns' => { # optional
'inboundParseDomain' => 'dev.test' # optional
}
}
*/
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreateEnvironmentPayload {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Novu {
pub async fn update_environment(
&self,
environment_id: String,
data: CreateEnvironmentPayload, // this is flattened, fix
data: CreateEnvironmentPayload,
) -> Result<Environment, NovuError> {
let result = self
.client
Expand Down

0 comments on commit f999d73

Please sign in to comment.