refactor: demo.db migration structure
Some checks failed
/ integration-test--firefox (push) Failing after 3m7s
Some checks failed
/ integration-test--firefox (push) Failing after 3m7s
This commit is contained in:
parent
1f05189ec6
commit
cd4096b2ff
9 changed files with 26 additions and 46 deletions
|
|
@ -227,6 +227,16 @@ mod get {
|
|||
.clone()
|
||||
.map_or("".to_string(), |m| m.to_rfc3339());
|
||||
|
||||
let groups: Vec<String> = sqlx::query_as!(
|
||||
Group,
|
||||
"select * from groups where contact_id = $1",
|
||||
contact_id)
|
||||
.fetch_all(pool)
|
||||
.await?
|
||||
.into_iter()
|
||||
.map(|group| group.name)
|
||||
.collect();
|
||||
|
||||
let text_body: String =
|
||||
sqlx::query!("select text_body from contacts where id = $1", contact_id)
|
||||
.fetch_one(pool)
|
||||
|
|
@ -287,6 +297,14 @@ mod get {
|
|||
}
|
||||
input type="button" value="Add" x-on:click="addresses.push({ label: new_label, value: new_address }); new_label = ''; new_address = ''";
|
||||
}
|
||||
label { "groups" }
|
||||
#groups x-data=(json!({ "groups": groups, "new_group": "" })) {
|
||||
template x-for="(group, index) in groups" x-bind:key="index" {
|
||||
input name="group" x-model="group" placeholder="group name";
|
||||
}
|
||||
input name="group" x-model="new_group" placeholder="group name";
|
||||
input type="button" value="Add" x-on:click="groups.push(new_group); new_group = ''";
|
||||
}
|
||||
}
|
||||
div #text_body {
|
||||
div { "Free text (supports markdown)" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue