mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2025-03-14 13:08:27 +03:00
preload creds manager
This commit is contained in:
parent
1ddbf196ff
commit
5e6e04514e
4 changed files with 17 additions and 4 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1,7 +1,5 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "actix"
|
||||
version = "0.10.0"
|
||||
|
@ -441,7 +439,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "argon2-creds"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/realaravinth/argon2-creds#bc5949a86cdc7e57a54deb08ed65bae978163f71"
|
||||
source = "git+https://github.com/realaravinth/argon2-creds#c899181a1bdb65134cc329f26c5dd3601d89fc45"
|
||||
dependencies = [
|
||||
"ammonia",
|
||||
"derive_builder 0.10.2",
|
||||
|
|
|
@ -39,7 +39,7 @@ cache-buster = { version = "0.2.0", git = "https://github.com/realaravinth/cache
|
|||
futures = "0.3.14"
|
||||
|
||||
sqlx = { version = "0.4.0", features = [ "runtime-actix-rustls", "postgres", "time", "offline" ] }
|
||||
argon2-creds = { version = "0.2.1", git = "https://github.com/realaravinth/argon2-creds"}
|
||||
argon2-creds = { branch = "master", git = "https://github.com/realaravinth/argon2-creds"}
|
||||
config = "0.11"
|
||||
validator = { version = "0.13", features = ["derive"]}
|
||||
|
||||
|
|
|
@ -108,6 +108,10 @@ impl Data {
|
|||
.build()
|
||||
.unwrap();
|
||||
|
||||
log::info!("Initializing credential manager");
|
||||
creds.init();
|
||||
log::info!("Initialized credential manager");
|
||||
|
||||
let data = match &SETTINGS.redis {
|
||||
Some(val) => {
|
||||
let master = RedisMaster::new(RedisConfig::Single(val.url.clone()))
|
||||
|
|
|
@ -6,6 +6,16 @@
|
|||
<. include!("./help-banner/index.html"); .>
|
||||
<div class="inner-container">
|
||||
|
||||
<. if sitekeys.is_empty() { .>
|
||||
<ul class="sitekey-list__box">
|
||||
<p>
|
||||
It looks like you don't have any sitekeys. Click
|
||||
<a href="<.= crate::PAGES.panel.sitekey.add .>">here></a> to add new sitekey.
|
||||
</p>
|
||||
</ul>
|
||||
|
||||
|
||||
<.} else {.>
|
||||
<ul class="sitekey-list__box">
|
||||
<h1 class="sitekey-list__title">Your Sitekeys</h1>
|
||||
<. for sitekey in sitekeys.iter() { .>
|
||||
|
@ -24,6 +34,7 @@
|
|||
<. } .>
|
||||
</ul>
|
||||
|
||||
<.}.>
|
||||
|
||||
</div>
|
||||
<. include!("../components/footers.html"); .>
|
||||
|
|
Loading…
Add table
Reference in a new issue