mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-11-29 16:38:35 +00:00
clear cookie after account deletion and CI: skip build
This commit is contained in:
parent
4c293bdb5a
commit
67a35a6e43
9
.github/workflows/linux.yml
vendored
9
.github/workflows/linux.yml
vendored
@ -73,13 +73,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||||
|
|
||||||
- name: build
|
- name: build frontend
|
||||||
run: make
|
run: make frontend
|
||||||
env:
|
|
||||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
|
||||||
|
|
||||||
# - name: build frontend
|
|
||||||
# run: make frontend
|
|
||||||
|
|
||||||
- name: run tests
|
- name: run tests
|
||||||
run: make test
|
run: make test
|
||||||
|
|||||||
@ -44,14 +44,13 @@ async fn delete_account(
|
|||||||
.fetch_one(&data.db)
|
.fetch_one(&data.db)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
id.forget();
|
|
||||||
|
|
||||||
match rec {
|
match rec {
|
||||||
Ok(s) => {
|
Ok(s) => {
|
||||||
if Config::verify(&s.password, &payload.password)? {
|
if Config::verify(&s.password, &payload.password)? {
|
||||||
sqlx::query!("DELETE FROM mcaptcha_users WHERE name = ($1)", &username)
|
sqlx::query!("DELETE FROM mcaptcha_users WHERE name = ($1)", &username)
|
||||||
.execute(&data.db)
|
.execute(&data.db)
|
||||||
.await?;
|
.await?;
|
||||||
|
id.forget();
|
||||||
Ok(HttpResponse::Ok())
|
Ok(HttpResponse::Ok())
|
||||||
} else {
|
} else {
|
||||||
Err(ServiceError::WrongPassword)
|
Err(ServiceError::WrongPassword)
|
||||||
|
|||||||
12
src/main.rs
12
src/main.rs
@ -83,12 +83,12 @@ lazy_static! {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub static OPEN_API_DOC: &str = env!("OPEN_API_DOCS");
|
pub const OPEN_API_DOC: &str = env!("OPEN_API_DOCS");
|
||||||
pub static GIT_COMMIT_HASH: &str = env!("GIT_HASH");
|
pub const GIT_COMMIT_HASH: &str = env!("GIT_HASH");
|
||||||
pub static VERSION: &str = env!("CARGO_PKG_VERSION");
|
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
pub static PKG_NAME: &str = env!("CARGO_PKG_NAME");
|
pub const PKG_NAME: &str = env!("CARGO_PKG_NAME");
|
||||||
pub static PKG_DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
|
pub const PKG_DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
|
||||||
pub static PKG_HOMEPAGE: &str = env!("CARGO_PKG_HOMEPAGE");
|
pub const PKG_HOMEPAGE: &str = env!("CARGO_PKG_HOMEPAGE");
|
||||||
|
|
||||||
pub const CACHE_AGE: u32 = 604800;
|
pub const CACHE_AGE: u32 = 604800;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user