feat: add cron
This commit is contained in:
@@ -190,16 +190,16 @@ impl Model {
|
||||
let subscription_model = Entity::find_by_id(subscription_id)
|
||||
.one(db)
|
||||
.await?
|
||||
.ok_or_else(|| RecorderError::ModelEntityNotFound {
|
||||
entity: "Subscription".into(),
|
||||
})?;
|
||||
.ok_or_else(|| RecorderError::from_model_not_found("Subscription"))?;
|
||||
|
||||
if subscription_model.subscriber_id != subscriber_id {
|
||||
Err(RecorderError::ModelEntityNotFound {
|
||||
entity: "Subscription".into(),
|
||||
})?;
|
||||
Err(RecorderError::from_model_not_found("Subscription"))?;
|
||||
}
|
||||
|
||||
Ok(subscription_model)
|
||||
}
|
||||
|
||||
pub async fn exec_cron(&self, _ctx: &dyn AppContextTrait) -> RecorderResult<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user