Skip to content

Commit 257e77c

Browse files
committed
client-api: Add parent parameter to publish endpoint
This is the minimal patch to implement the private controldb side of the teams feature. The parameter is ignored for now.
1 parent 624d9fc commit 257e77c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

crates/client-api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ pub struct DatabaseDef {
170170
pub num_replicas: Option<NonZeroU8>,
171171
/// The host type of the supplied program.
172172
pub host_type: HostType,
173+
pub parent: Option<Identity>,
173174
}
174175

175176
/// Parameters for resetting a database via [`ControlStateDelegate::reset_database`].

crates/client-api/src/routes/database.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ pub struct PublishDatabaseQueryParams {
581581
policy: MigrationPolicy,
582582
#[serde(default)]
583583
host_type: HostType,
584+
#[allow(unused)] // ignore for now
585+
parent: Option<NameOrIdentity>,
584586
}
585587

586588
pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
@@ -592,6 +594,7 @@ pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
592594
token,
593595
policy,
594596
host_type,
597+
parent: _, // ignore for now
595598
}): Query<PublishDatabaseQueryParams>,
596599
Extension(auth): Extension<SpacetimeAuth>,
597600
program_bytes: Bytes,
@@ -662,6 +665,7 @@ pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
662665
program_bytes,
663666
num_replicas,
664667
host_type,
668+
parent: None,
665669
},
666670
schema_migration_policy,
667671
)
@@ -814,6 +818,7 @@ pub async fn pre_publish<S: NodeDelegate + ControlStateDelegate>(
814818
program_bytes,
815819
num_replicas: None,
816820
host_type,
821+
parent: None,
817822
},
818823
style,
819824
)

crates/testing/src/modules.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ impl CompiledModule {
210210
program_bytes: self.program_bytes(),
211211
num_replicas: None,
212212
host_type: self.host_type,
213+
parent: None,
213214
},
214215
MigrationPolicy::Compatible,
215216
)

0 commit comments

Comments
 (0)