remove remaining dead code left over from /dev endpoints

db::ensure_dev_athlete was never called (main.rs had its own,
inferior copy, removed in the previous commit). Config::dev_sync_days
and Config::require_api_key were only used by the now-removed
/dev/sync handlers.
This commit is contained in:
Claude 2026-08-13 02:09:58 +00:00 committed by Jonas Rabenstein
commit 85369069c3
2 changed files with 0 additions and 53 deletions

View file

@ -158,40 +158,6 @@ pub async fn delete_old_oauth_states(db: &PgPool) -> Result<()> {
Ok(())
}
pub async fn ensure_dev_athlete(
db: &PgPool,
intervals_athlete_id: &str,
display_name: &str,
api_key: &str,
) -> Result<i64> {
let row = sqlx::query(
r#"
INSERT INTO athletes (
intervals_athlete_id,
display_name,
access_token,
scopes
)
VALUES ($1, $2, $3, 'dev')
ON CONFLICT (intervals_athlete_id)
DO UPDATE SET
display_name = EXCLUDED.display_name,
access_token = EXCLUDED.access_token,
updated_at = now()
RETURNING id
"#,
)
.bind(intervals_athlete_id)
.bind(display_name)
.bind(api_key)
.fetch_one(db)
.await?;
use sqlx::Row;
Ok(row.try_get("id")?)
}
/// Create or update an athlete authenticated with a personal API key.
pub async fn upsert_api_key_athlete(
db: &PgPool,