JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Fixes

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨863a1d7

Showing ⁨⁨7⁩ changed files⁩ with ⁨⁨9⁩ insertions⁩ and ⁨⁨704⁩ deletions⁩

giterated-daemon/src/backend/git.rs

View file
@@ -295,6 +295,7 @@ impl RepositoryBackend for GitBackend {
295 295 ) -> Result<AnyValue<Repository>, Error> {
296 296 Ok(match name {
297 297 "description" => unsafe {
298 info!("Description");
298 299 AnyValue::from_raw(
299 300 self.get_setting(repository, RepositoryDescription::name())
300 301 .await?

giterated-models/src/repository/values.rs

View file
@@ -1,3 +1,5 @@
1 use std::fmt::Display;
2
1 3 use serde::{Deserialize, Serialize};
2 4
3 5 use crate::{settings::Setting, value::GiteratedObjectValue};
@@ -19,6 +21,12 @@ use super::{Repository, RepositoryVisibility};
19 21 #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)]
20 22 pub struct Description(pub String);
21 23
24 impl Display for Description {
25 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26 f.write_str(&self.0)
27 }
28 }
29
22 30 impl GiteratedObjectValue for Description {
23 31 type Object = Repository;
24 32