Skip to content

Commit

Permalink
fix: remove bare ulid dep from bl
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbchron committed Feb 26, 2024
1 parent 988d934 commit ade7dfc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

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

2 changes: 0 additions & 2 deletions crates/bl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ image = { workspace = true, optional = true }
qrcode = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
surrealdb = { workspace = true, optional = true }
ulid = { workspace = true, optional = true }

[features]
default = []
hydrate = [ "leptos/hydrate" ]
ssr = [
"core_types/ssr", "leptos/ssr", "dep:clients", "dep:artifact", "dep:base64",
"dep:color-eyre", "dep:image", "dep:qrcode", "dep:tracing", "dep:surrealdb",
"dep:ulid",
]
8 changes: 4 additions & 4 deletions crates/bl/src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use clients::surreal::SurrealRootClient;
use color_eyre::eyre::Result;
use core_types::{
Photo, PhotoArtifacts, PhotoGroup, PhotoGroupStatus, PrivateArtifact,
PublicArtifact,
PublicArtifact, Ulid,
};
use serde::{Deserialize, Serialize};
use surrealdb::opt::PatchOp;
Expand Down Expand Up @@ -83,9 +83,9 @@ pub async fn upload_single_photo(

// create a photo and upload it to surreal
let photo = Photo {
id: core_types::PhotoRecordId(ulid::Ulid::new()),
id: core_types::PhotoRecordId(Ulid::new()),
// this is set to nil because we don't have a group yet
group: core_types::PhotoGroupRecordId(ulid::Ulid::nil()),
group: core_types::PhotoGroupRecordId(Ulid::nil()),
artifacts: PhotoArtifacts {
original: core_types::PrivateImageArtifact {
artifact_id: original_artifact.id,
Expand Down Expand Up @@ -114,7 +114,7 @@ pub async fn upload_single_photo(

// create a photo group and upload it to surreal
let group = PhotoGroup {
id: core_types::PhotoGroupRecordId(ulid::Ulid::new()),
id: core_types::PhotoGroupRecordId(Ulid::new()),
owner: user_id,
photographer: user_id,
photos: vec![photo.id],
Expand Down

0 comments on commit ade7dfc

Please sign in to comment.