mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-12-04 15:16:31 +00:00
Add Redis to CI.
This commit is contained in:
parent
65a1261589
commit
9ae51e26c8
3 changed files with 88 additions and 3 deletions
12
.github/workflows/general.yml
vendored
12
.github/workflows/general.yml
vendored
|
@ -6,11 +6,11 @@ on:
|
|||
# this specific branch (a.k.a. book chapter).
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- root-chapter-10-part2
|
||||
pull_request:
|
||||
types: [ opened, synchronize, reopened ]
|
||||
branches:
|
||||
- main
|
||||
- root-chapter-10-part2
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
@ -28,6 +28,10 @@ jobs:
|
|||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
redis:
|
||||
image: redis:6
|
||||
ports:
|
||||
- 6379:6379
|
||||
env:
|
||||
SQLX_VERSION: 0.5.7
|
||||
SQLX_FEATURES: postgres
|
||||
|
@ -173,6 +177,10 @@ jobs:
|
|||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
redis:
|
||||
image: redis:6
|
||||
ports:
|
||||
- 6379:6379
|
||||
env:
|
||||
SQLX_VERSION: 0.5.7
|
||||
SQLX_FEATURES: postgres
|
||||
|
|
|
@ -1,5 +1,38 @@
|
|||
{
|
||||
"db": "PostgreSQL",
|
||||
"2880480077b654e38b63f423ab40680697a500ffe1af1d1b39108910594b581b": {
|
||||
"query": "\n UPDATE users\n SET password_hash = $1\n WHERE user_id = $2\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
}
|
||||
},
|
||||
"33b11051e779866db9aeb86d28a59db07a94323ffdc59a5a2c1da694ebe9a65f": {
|
||||
"query": "\n SELECT username\n FROM users\n WHERE user_id = $1\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "username",
|
||||
"type_info": "Text"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Uuid"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
}
|
||||
},
|
||||
"51c9c995452d3359e3da7e2f2ff8a6e68690f740a36d2a32ec7c40b08931ebdb": {
|
||||
"query": "\n INSERT INTO subscriptions (id, email, name, subscribed_at, status)\n VALUES ($1, $2, $3, $4, 'pending_confirmation')\n ",
|
||||
"describe": {
|
||||
|
@ -28,6 +61,24 @@
|
|||
"nullable": []
|
||||
}
|
||||
},
|
||||
"7b57e2776a245ba1602f638121550485e2219a6ccaaa62b5ec3e4683e33a3b5f": {
|
||||
"query": "\n SELECT email\n FROM subscriptions\n WHERE status = 'confirmed'\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "email",
|
||||
"type_info": "Text"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": []
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
}
|
||||
},
|
||||
"a71a1932b894572106460ca2e34a63dc0cb8c1ba7a70547add1cddbb68133c2b": {
|
||||
"query": "UPDATE subscriptions SET status = 'confirmed' WHERE id = $1",
|
||||
"describe": {
|
||||
|
@ -40,6 +91,32 @@
|
|||
"nullable": []
|
||||
}
|
||||
},
|
||||
"acf1b96c82ddf18db02e71a0e297c822b46f10add52c54649cf599b883165e58": {
|
||||
"query": "\n SELECT user_id, password_hash\n FROM users\n WHERE username = $1\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "user_id",
|
||||
"type_info": "Uuid"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "password_hash",
|
||||
"type_info": "Text"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false
|
||||
]
|
||||
}
|
||||
},
|
||||
"ad120337ee606be7b8d87238e2bb765d0da8ee61b1a3bc142414c4305ec5e17f": {
|
||||
"query": "SELECT subscriber_id FROM subscription_tokens WHERE subscription_token = $1",
|
||||
"describe": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use actix_web::{http::header::ContentType, HttpResponse};
|
||||
use actix_web_flash_messages::{IncomingFlashMessages};
|
||||
use actix_web_flash_messages::IncomingFlashMessages;
|
||||
use std::fmt::Write;
|
||||
|
||||
pub async fn login_form(flash_messages: IncomingFlashMessages) -> HttpResponse {
|
||||
|
|
Loading…
Reference in a new issue