Replace endpoint /calendar/schedule_recipe by /calendar/sheduled_recipe

This commit is contained in:
Greg Burri 2025-04-02 02:14:17 +02:00
parent 4f739593b8
commit 9b89117a66
4 changed files with 8 additions and 7 deletions

View file

@ -10,16 +10,17 @@ impl Connection {
async fn get<T>(&self, name: &str) -> Result<T>
where
T: FromStr,
T::Err: std::fmt::Display,
{
let v: String = sqlx::query_scalar("SELECT [value] FROM [Settings] WHERE [name] = $1")
.bind(name)
.fetch_one(&self.pool)
.await?;
T::from_str(&v).map_err(|_| {
T::from_str(&v).map_err(|error| {
DBError::Other(format!(
"Can't convert string value \"{}\" when reading setting {}",
v, name
"Can't convert string value \"{}\" when reading setting {}. Original error: {}",
v, name, error
))
})
}