mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-05-01 08:41:09 +00:00
Fix missed attrs
on room creation
This commit is contained in:
parent
2b6fbe8794
commit
6831c3d25a
1 changed files with 5 additions and 5 deletions
|
@ -341,18 +341,18 @@ async fn room_create(
|
||||||
let ruuid = Uuid::new_v4();
|
let ruuid = Uuid::new_v4();
|
||||||
|
|
||||||
let txn = conn.transaction()?;
|
let txn = conn.transaction()?;
|
||||||
let rid = txn.query_row(
|
txn.execute(
|
||||||
r"
|
r"
|
||||||
INSERT INTO `room` (`ruuid`, `title`)
|
INSERT INTO `room` (`ruuid`, `title`, `attrs`)
|
||||||
VALUES (:ruuid, :title)
|
VALUES (:ruuid, :title, :attrs)
|
||||||
RETURNING `rid`
|
|
||||||
",
|
",
|
||||||
named_params! {
|
named_params! {
|
||||||
":ruuid": ruuid,
|
":ruuid": ruuid,
|
||||||
":title": params.signee.payload.title,
|
":title": params.signee.payload.title,
|
||||||
|
":attrs": params.signee.payload.attrs,
|
||||||
},
|
},
|
||||||
|row| row.get::<_, u64>(0),
|
|
||||||
)?;
|
)?;
|
||||||
|
let rid = txn.last_insert_rowid() as u64;
|
||||||
let mut insert_user = txn.prepare(
|
let mut insert_user = txn.prepare(
|
||||||
r"
|
r"
|
||||||
INSERT INTO `user` (`userkey`)
|
INSERT INTO `user` (`userkey`)
|
||||||
|
|
Loading…
Add table
Reference in a new issue