Skip to content

Commit 943ef0d

Browse files
committed
hotfixes
1 parent 235eb90 commit 943ef0d

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/desktop/src/components/editor-area/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export function useEnhanceMutation({
212212
{
213213
type,
214214
editor: rawContent,
215-
words,
215+
words: JSON.stringify(words),
216216
participants,
217217
},
218218
);

crates/db-script/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ serde_json = { workspace = true }
1212

1313
[dev-dependencies]
1414
hypr-data = { workspace = true }
15+
hypr-db-core = { workspace = true }
16+
17+
tokio = { workspace = true, features = ["macros"] }

crates/db-script/src/lib.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub mod conversation_to_words {
4545
Err(_) => continue,
4646
};
4747

48-
let conversations_str = match row.get_str(8) {
48+
let conversations_str = match row.get_str(1) {
4949
Ok(convs) => convs.to_string(),
5050
Err(_) => continue,
5151
};
@@ -85,3 +85,20 @@ pub mod conversation_to_words {
8585
}
8686
}
8787
}
88+
89+
#[cfg(test)]
90+
mod tests {
91+
use super::*;
92+
93+
#[tokio::test]
94+
async fn test_run() {
95+
let db = hypr_db_core::DatabaseBuilder::default()
96+
.local("./src/db.sqlite")
97+
.build()
98+
.await
99+
.unwrap();
100+
101+
let conn = db.conn().unwrap();
102+
conversation_to_words::run(&conn).await;
103+
}
104+
}

0 commit comments

Comments
 (0)