Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Send key_id in partial project config #854

Merged
merged 6 commits into from
Nov 26, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions relay-server/src/actors/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub struct LimitedProjectState {
pub project_id: Option<ProjectId>,
pub last_change: Option<DateTime<Utc>>,
pub disabled: bool,
#[serde(with = "limited_public_key_comfigs")]
#[serde(with = "limited_public_key_configs")]
pub public_keys: SmallVec<[PublicKeyConfig; 1]>,
pub slug: Option<String>,
#[serde(with = "LimitedProjectConfig")]
Expand Down Expand Up @@ -365,13 +365,11 @@ pub struct PublicKeyConfig {
pub public_key: ProjectKey,

/// The primary key of the DSN in Sentry's main database.
///
/// Only available for internal relays.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub numeric_id: Option<u64>,
}

mod limited_public_key_comfigs {
mod limited_public_key_configs {
use super::*;
use serde::ser::SerializeSeq;

Expand All @@ -380,6 +378,8 @@ mod limited_public_key_comfigs {
#[serde(rename_all = "camelCase", remote = "PublicKeyConfig")]
pub struct LimitedPublicKeyConfig {
pub public_key: ProjectKey,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub numeric_id: Option<u64>,
tonyo marked this conversation as resolved.
Show resolved Hide resolved
}

/// Serializes a list of `PublicKeyConfig` objects using `LimitedPublicKeyConfig`.
Expand Down