pub async fn update_key( key: &str, old_key: &str, username: &str, data: &AppData) -> Result<(), Error>