Skip to content

Commit

Permalink
Merge pull request #39 from lightningrodlabs/hc-124
Browse files Browse the repository at this point in the history
update to 124 and remove dummy avatars
  • Loading branch information
zippy authored Feb 6, 2022
2 parents 39ac19b + 28b2b03 commit 2ae688b
Show file tree
Hide file tree
Showing 14 changed files with 322 additions and 190 deletions.
49 changes: 22 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
let
holonixRev = "c72cfede8d1e673fdbd5f1b6e908fa3086f56e8d";
holonixRev = "1798d764873d53cfce576860b707af35ef4ba7cd";
holonixPath = builtins.fetchTarball "https://github.com/holochain/holonix/archive/${holonixRev}.tar.gz";
holonix = import (holonixPath) {
holochainVersionId = "v0_0_123";
holochainVersionId = "v0_0_124";
};
nixpkgs = holonix.pkgs;
in nixpkgs.mkShell {
Expand Down
5 changes: 1 addition & 4 deletions dna/zomes/profiles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@ crate-type = ["cdylib", "rlib"]
name = "profiles"

[dependencies]
hc_zome_profiles = {git = "https://github.com/holochain-open-dev/profiles", tag = "for-hc-v0.0.123", package = "hc_zome_profiles"}

hdk = "0.0.119"
holo_hash = "0.0.16"
hc_zome_profiles = {git = "https://github.com/holochain-open-dev/profiles", tag = "for-hc-v0.0.124", package = "hc_zome_profiles"}
5 changes: 2 additions & 3 deletions dna/zomes/where/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ chrono = {version = "0.4", features = ['alloc', 'std']}
derive_more = "0.99"
serde = "1.0.123"
thiserror = "1.0.20"
hc_utils = {git = "https://github.com/holochain/hc-utils", branch = "v0.0.123", package = "hc_utils"}
hc_utils = {git = "https://github.com/holochain/hc-utils", branch = "v0.0.124", package = "hc_utils"}
#hc_utils = {git = "https://github.com/ddd-mtl/hc-utils", branch = "develop", package = "hc_utils"}
hdk = "0.0.119"
holo_hash = {version = "0.0.16", features = ["encoding"]}
hdk = {version = "0.0.120", features = ["encoding"]}

[dev-dependencies]
#holochain = { git = "https://github.com/holochain/holochain.git", branch = "develop", features = ["test_utils"] }
Expand Down
15 changes: 14 additions & 1 deletion dna/zomes/where/src/here.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub struct Here {
}


/// Input to the create channel call
#[derive(Debug, Serialize, Deserialize, SerializedBytes)]
#[serde(rename_all = "camelCase")]
pub struct AddHereInput {
Expand All @@ -29,6 +28,14 @@ pub struct AddHereInput {
pub meta: BTreeMap<String, String>,
}

/// Input to update a Here
#[derive(Debug, Serialize, Deserialize, SerializedBytes)]
#[serde(rename_all = "camelCase")]
pub struct UpdateHereInput {
old_here_hh: HeaderHashB64,
new_here: AddHereInput,
}

#[hdk_extern]
fn add_here(input: AddHereInput) -> ExternResult<HeaderHashB64> {
// Find session
Expand All @@ -46,6 +53,12 @@ fn add_here(input: AddHereInput) -> ExternResult<HeaderHashB64> {
Ok(link_hh.into())
}

#[hdk_extern]
fn update_here(input: UpdateHereInput) -> ExternResult<HeaderHashB64> {
delete_here(input.old_here_hh)?;
add_here(input.new_here)
}

#[hdk_extern]
fn delete_here(link_hh: HeaderHashB64) -> ExternResult<()> {
delete_link(link_hh.into())?;
Expand Down
Loading

0 comments on commit 2ae688b

Please sign in to comment.