Skip to content

Commit cc269a5

Browse files
committed
fix: use AccessToken for viz push authentication (was only checking ApiKey)
1 parent a0641f9 commit cc269a5

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

src/main.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,9 +919,20 @@ fn main() -> anyhow::Result<()> {
919919
.post(&viz_url)
920920
.header("Content-Type", "application/json");
921921

922-
if let indra_db::Auth::ApiKey(ref key) = sync_config.auth {
923-
viz_request = viz_request
924-
.header("Authorization", format!("Bearer {}", key));
922+
match &sync_config.auth {
923+
indra_db::Auth::AccessToken(token) => {
924+
viz_request = viz_request.header(
925+
"Authorization",
926+
format!("Bearer {}", token),
927+
);
928+
}
929+
indra_db::Auth::ApiKey(key) => {
930+
viz_request = viz_request.header(
931+
"Authorization",
932+
format!("Bearer {}", key),
933+
);
934+
}
935+
indra_db::Auth::None => {}
925936
}
926937

927938
match viz_request.json(viz_data).send() {

0 commit comments

Comments
 (0)