feat: deploy

This commit is contained in:
Maulana Sodiqin
2025-03-19 19:33:56 +07:00
parent f9c49d44b5
commit 2872c1827a
7 changed files with 431 additions and 273 deletions
+16
View File
@@ -48,6 +48,22 @@ impl<'a> GachaRepository<'a> {
}
}
pub async fn query_gacha_claim_by_name(
&self,
name: String,
) -> Result<GachaItemResponseDto> {
let db = &self.state.surrealdb;
let result = db
.select((ResourceEnum::GachaClaims.to_string(), name))
.await?;
match result {
Some(response) => Ok(response),
None => bail!("Gacha item not found"),
}
}
pub async fn query_create_gacha_claim(
&self,
data: GachaCreateClaimRequestDto,