clear cookie after account deletion and CI: skip build
This commit is contained in:
parent
4c293bdb5a
commit
67a35a6e43
3 changed files with 9 additions and 15 deletions
9
.github/workflows/linux.yml
vendored
9
.github/workflows/linux.yml
vendored
|
@ -73,13 +73,8 @@ jobs:
|
|||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
- name: build
|
||||
run: make
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
# - name: build frontend
|
||||
# run: make frontend
|
||||
- name: build frontend
|
||||
run: make frontend
|
||||
|
||||
- name: run tests
|
||||
run: make test
|
||||
|
|
|
@ -44,14 +44,13 @@ async fn delete_account(
|
|||
.fetch_one(&data.db)
|
||||
.await;
|
||||
|
||||
id.forget();
|
||||
|
||||
match rec {
|
||||
Ok(s) => {
|
||||
if Config::verify(&s.password, &payload.password)? {
|
||||
sqlx::query!("DELETE FROM mcaptcha_users WHERE name = ($1)", &username)
|
||||
.execute(&data.db)
|
||||
.await?;
|
||||
id.forget();
|
||||
Ok(HttpResponse::Ok())
|
||||
} else {
|
||||
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 static GIT_COMMIT_HASH: &str = env!("GIT_HASH");
|
||||
pub static VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
pub static PKG_NAME: &str = env!("CARGO_PKG_NAME");
|
||||
pub static PKG_DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
|
||||
pub static PKG_HOMEPAGE: &str = env!("CARGO_PKG_HOMEPAGE");
|
||||
pub const OPEN_API_DOC: &str = env!("OPEN_API_DOCS");
|
||||
pub const GIT_COMMIT_HASH: &str = env!("GIT_HASH");
|
||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
pub const PKG_NAME: &str = env!("CARGO_PKG_NAME");
|
||||
pub const PKG_DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
|
||||
pub const PKG_HOMEPAGE: &str = env!("CARGO_PKG_HOMEPAGE");
|
||||
|
||||
pub const CACHE_AGE: u32 = 604800;
|
||||
|
||||
|
|
Loading…
Reference in a new issue