chore: replace axum republish of async trait with actual async trait
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
75302c35c6
commit
cb7f01e85d
@ -26,11 +26,9 @@ pub struct GetLatestArtifact {
|
||||
}
|
||||
|
||||
pub mod traits {
|
||||
use axum::async_trait;
|
||||
|
||||
use super::{AddCommitArtifact, Artifact, GetLatestArtifact};
|
||||
|
||||
#[async_trait]
|
||||
#[async_trait::async_trait]
|
||||
pub trait ArtifactsDB {
|
||||
async fn commit_artifact(&self, commit_artifact: AddCommitArtifact) -> anyhow::Result<()>;
|
||||
async fn get_latest_artifact(
|
||||
@ -41,7 +39,6 @@ pub mod traits {
|
||||
}
|
||||
|
||||
pub mod defaults {
|
||||
use axum::async_trait;
|
||||
use sqlx::PgPool;
|
||||
|
||||
use super::{traits, AddCommitArtifact, Artifact, GetLatestArtifact};
|
||||
@ -56,7 +53,7 @@ pub mod defaults {
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
#[async_trait::async_trait]
|
||||
impl traits::ArtifactsDB for DefaultArtifactsDB {
|
||||
async fn commit_artifact(&self, commit_artifact: AddCommitArtifact) -> anyhow::Result<()> {
|
||||
sqlx::query("INSERT INTO artifacts (app, branch, artifact_id) VALUES ($1, $2, $3)")
|
||||
|
Loading…
Reference in New Issue
Block a user