now products have different options, like different parameters
Some checks failed
CI / Check Style (push) Has been cancelled
CI / Run Clippy (push) Has been cancelled
CI / Run Tests (push) Has been cancelled

This commit is contained in:
Priec
2026-06-22 15:44:02 +02:00
parent 29854a972b
commit 3f798432a0
52 changed files with 1281 additions and 628 deletions

View File

@@ -17,7 +17,7 @@ impl ActiveModelBehavior for ActiveModel {
{
if !insert && self.updated_at.is_unchanged() {
let mut this = self;
this.updated_at = sea_orm::ActiveValue::Set(Utc::now());
this.updated_at = sea_orm::ActiveValue::Set(Utc::now().into());
Ok(this)
} else {
Ok(self)
@@ -34,7 +34,7 @@ impl OAuth2SessionsTrait<users::Model> for Model {
.one(db)
.await?
.ok_or_else(|| ModelError::EntityNotFound)?;
Ok(session.expires_at < Utc::now())
Ok(session.expires_at < Utc::now().fixed_offset())
}
/// Create or refresh the session row for `user` from the provider token.
@@ -58,14 +58,14 @@ impl OAuth2SessionsTrait<users::Model> for Model {
Some(session) => {
let mut session: o_auth2_sessions::ActiveModel = session.into();
session.session_id = ActiveValue::set(session_id);
session.expires_at = ActiveValue::set(expires_at);
session.updated_at = ActiveValue::set(Utc::now());
session.expires_at = ActiveValue::set(expires_at.into());
session.updated_at = ActiveValue::set(Utc::now().into());
session.update(&txn).await?
}
None => {
o_auth2_sessions::ActiveModel {
session_id: ActiveValue::set(session_id),
expires_at: ActiveValue::set(expires_at),
expires_at: ActiveValue::set(expires_at.into()),
user_id: ActiveValue::set(user.id),
..Default::default()
}