Skip to content

Commit 3bc1902

Browse files
committed
Expose imprint storage settings
1 parent 4f494bd commit 3bc1902

2 files changed

Lines changed: 367 additions & 2 deletions

File tree

thoth-api/src/graphql/model.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,24 @@ impl Imprint {
13191319
self.crossmark_doi.as_ref()
13201320
}
13211321

1322+
#[graphql(description = "S3 bucket used for files belonging to this imprint")]
1323+
pub fn s3_bucket(&self, context: &Context) -> FieldResult<Option<&str>> {
1324+
context.require_superuser()?;
1325+
Ok(self.s3_bucket.as_deref())
1326+
}
1327+
1328+
#[graphql(description = "CDN domain used for files belonging to this imprint")]
1329+
pub fn cdn_domain(&self, context: &Context) -> FieldResult<Option<&str>> {
1330+
context.require_superuser()?;
1331+
Ok(self.cdn_domain.as_deref())
1332+
}
1333+
1334+
#[graphql(description = "CloudFront distribution ID used for files belonging to this imprint")]
1335+
pub fn cloudfront_dist_id(&self, context: &Context) -> FieldResult<Option<&str>> {
1336+
context.require_superuser()?;
1337+
Ok(self.cloudfront_dist_id.as_deref())
1338+
}
1339+
13221340
#[graphql(description = "Default currency code for works under this imprint")]
13231341
pub fn default_currency(&self) -> Option<&CurrencyCode> {
13241342
self.default_currency.as_ref()

0 commit comments

Comments
 (0)