format some sql strings
This commit is contained in:
parent
eeac92ec91
commit
e46360eaa7
|
@ -24,8 +24,9 @@ impl Post {
|
||||||
.fetch_all(
|
.fetch_all(
|
||||||
sqlx::query(
|
sqlx::query(
|
||||||
r#"
|
r#"
|
||||||
INSERT INTO posts (title, body, published)
|
INSERT INTO posts (title, body, published)
|
||||||
VALUES ($1, $2, $3); "#,
|
VALUES ($1, $2, $3);
|
||||||
|
"#,
|
||||||
)
|
)
|
||||||
.bind(title)
|
.bind(title)
|
||||||
.bind(body)
|
.bind(body)
|
||||||
|
@ -65,9 +66,9 @@ impl User {
|
||||||
.fetch_all(
|
.fetch_all(
|
||||||
sqlx::query(
|
sqlx::query(
|
||||||
r#"
|
r#"
|
||||||
INSERT INTO users (username, password)
|
INSERT INTO users (username, password)
|
||||||
VALUES ($1, $2);
|
VALUES ($1, $2);
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.bind(username)
|
.bind(username)
|
||||||
.bind(sha256::digest(password)),
|
.bind(sha256::digest(password)),
|
||||||
|
|
Loading…
Reference in New Issue