forked from onlydustxyz/marketplace-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76c376b
commit 8639878
Showing
4 changed files
with
29 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
use anyhow::Result; | ||
use domain::*; | ||
use infrastructure::http; | ||
use serde_json::json; | ||
|
||
use crate::domain::services::new_indexer; | ||
|
||
#[async_trait] | ||
impl new_indexer::Service for http::Client { | ||
async fn index_repo(&self, repo_id: GithubRepoId) -> Result<()> { | ||
self.put(format!("api/v1/indexes/repos/{repo_id}")).await?; | ||
self.post( | ||
"api/v1/events/on-repo-link-changed".to_string(), | ||
Some(json!({ | ||
"linkedRepoIds": [repo_id] | ||
})), | ||
) | ||
.await?; | ||
Ok(()) | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
api/tests/resources/wiremock/new_indexer/mappings/index_any_repo_success.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters