add: move database drivers to oiseau

This commit is contained in:
trisua 2025-06-08 14:15:42 -04:00
parent 40fce4bc77
commit 81036e3733
57 changed files with 638 additions and 1106 deletions

View file

@ -92,13 +92,20 @@ pub async fn proxy_request(
req.data.insert("format".to_string(), "json".to_string());
req.data.insert(
"api_key".to_string(),
data.0.connections.last_fm_key.as_ref().unwrap().to_string(),
data.0
.0
.connections
.last_fm_key
.as_ref()
.unwrap()
.to_string(),
);
req.data.insert(
"api_sig".to_string(),
LastFmConnection::signature(
req.data.clone(),
data.0
.0
.connections
.last_fm_secret
.as_ref()

View file

@ -17,7 +17,7 @@ pub async fn stripe_webhook(
) -> impl IntoResponse {
let data = &(data.read().await).0;
if data.0.stripe.is_none() {
if data.0.0.stripe.is_none() {
return Json(Error::MiscError("Disabled".to_string()).into());
}
@ -29,7 +29,7 @@ pub async fn stripe_webhook(
let req = match stripe::Webhook::construct_event(
&body,
sig.to_str().unwrap(),
&data.0.stripe.as_ref().unwrap().webhook_signing_secret,
&data.0.0.stripe.as_ref().unwrap().webhook_signing_secret,
) {
Ok(e) => e,
Err(e) => return Json(Error::MiscError(e.to_string()).into()),