parent
417875300f
commit
c182cb47e8
|
|
@ -5,8 +5,7 @@
|
||||||
// GOOGLE_CLIENT_SECRET=yyy
|
// GOOGLE_CLIENT_SECRET=yyy
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Extension, Host, Query, State},
|
extract::{Extension, Host, Query, State}, response::{IntoResponse, Redirect}
|
||||||
response::{IntoResponse, Redirect},
|
|
||||||
};
|
};
|
||||||
use axum_extra::TypedHeader;
|
use axum_extra::TypedHeader;
|
||||||
use dotenvy::var;
|
use dotenvy::var;
|
||||||
|
|
@ -221,7 +220,8 @@ pub async fn google_auth_return(
|
||||||
|
|
||||||
// send email to admin regarding new user registration
|
// send email to admin regarding new user registration
|
||||||
let recipients = get_useremails_by_role("admin".to_string(), &db_pool).await;
|
let recipients = get_useremails_by_role("admin".to_string(), &db_pool).await;
|
||||||
send_emails("Jean-Marie website - New user registration".to_string(), recipients, "A new user has registered".to_string());
|
let body = format!("A new user has registered on the website: <br> <b>Name:</b> {} <br> <b>Email:</b> {} <br> <b>Family Name:</b> {} <br> <b>Given Name:</b> {}", name, email, family_name, given_name);
|
||||||
|
send_emails("Jean-Marie website - New user registration".to_string(), recipients, body);
|
||||||
|
|
||||||
query.0
|
query.0
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,8 @@ async fn main() {
|
||||||
.route("/userwishlist/returned/:item_id", get(user_wishlist_returned_item))
|
.route("/userwishlist/returned/:item_id", get(user_wishlist_returned_item))
|
||||||
|
|
||||||
// Secret Gift Exchange - Not ready for public use yet
|
// Secret Gift Exchange - Not ready for public use yet
|
||||||
//.route("/giftexchanges", get(giftexchanges))
|
.route("/giftexchanges", get(giftexchanges))
|
||||||
//.route("/giftexchange/:giftexchange_id", get(giftexchange).post(giftexchange_save))
|
.route("/giftexchange/:giftexchange_id", get(giftexchange).post(giftexchange_save))
|
||||||
|
|
||||||
.nest_service("/assets", ServeDir::new("templates/assets")
|
.nest_service("/assets", ServeDir::new("templates/assets")
|
||||||
.fallback(get_service(ServeDir::new("templates/assets"))))
|
.fallback(get_service(ServeDir::new("templates/assets"))))
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row align-items-stretch">
|
<div class="row align-items-stretch">
|
||||||
|
<!-- Left panel -->
|
||||||
<div id="menu" class="col-md-2 bg-light">
|
<div id="menu" class="col-md-2 bg-light">
|
||||||
<!-- internal menu -->
|
|
||||||
<h2>Menu</h2>
|
<h2>Menu</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/dashboard">Web links</a></li>
|
<li><a href="/dashboard">Web links</a></li>
|
||||||
<li><a href="/cottagecalendar">Cottage Calendar</a></li>
|
<li><a href="/cottagecalendar">Cottage Calendar</a></li>
|
||||||
<li><a href="/wishlists">Wish lists</a></li>
|
<li><a href="/wishlists">Wish lists</a></li>
|
||||||
<li><a href="/giftexchanges">Gift Exchanges</a></li>
|
<!--<li><a href="/giftexchanges">Gift Exchanges</a></li>-->
|
||||||
</ul>
|
</ul>
|
||||||
{% for user_role in user_roles %}
|
{% for user_role in user_roles %}
|
||||||
{% if user_role.role_name == "admin" %}
|
{% if user_role.role_name == "admin" %}
|
||||||
|
|
@ -17,11 +16,14 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
|
||||||
|
<!-- Center panel -->
|
||||||
|
<div class="col-md-8">
|
||||||
{% block center %}{% endblock center %}
|
{% block center %}{% endblock center %}
|
||||||
</div>
|
</div>
|
||||||
<div id="events" class="col-2 bg-light">
|
|
||||||
<!-- events -->
|
<!-- Right panel -->
|
||||||
|
<div id="events" class="col-md-2 bg-light">
|
||||||
<h2>Events</h2>
|
<h2>Events</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{% extends "authorized.html" %}
|
{% extends "authorized.html" %}
|
||||||
{% block center %}
|
{% block center %}
|
||||||
<p>This will be the private information area for the extended Jean-Marie family.</p>
|
|
||||||
<div>
|
<div>
|
||||||
<h2>Web links</h2>
|
<h2>Web links</h2>
|
||||||
<h3>TLC Creations</h3>
|
<h3>TLC Creations</h3>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,11 @@
|
||||||
<td>{{ person_wishlist_item.item }}</td>
|
<td>{{ person_wishlist_item.item }}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<td><a href="{{ person_wishlist_item.item_url }}">URL</a></td>
|
{% if person_wishlist_item.item_url.len() > 0 %}
|
||||||
|
<td><a href="{{ person_wishlist_item.item_url }}">URL</a></td>
|
||||||
|
{% else %}
|
||||||
|
<td></td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if person_wishlist_item.received_at > 0 %}
|
{% if person_wishlist_item.received_at > 0 %}
|
||||||
<td>Got it!</td>
|
<td>Got it!</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue