Yōten: A social tracker for your language learning journey built on the atproto.

fix: xp not getting calculated correctly when a study session is deleted #22

merged opened by brookjeynes.dev targeting master from push-xlxvwwpkrpwv
Labels

None yet.

Participants 1
AT URI
at://did:plc:4mj54vc4ha3lh32ksxwunnbh/sh.tangled.repo.pull/3m3cf3haya422
+4 -4
Diff #0
+4 -4
internal/consumer/ingester.go
··· 263 263 } 264 264 265 265 i.Logger.Debug("deleting study session from pds request") 266 - err = db.DeleteStudySessionByRkey(tx, did, e.Commit.RKey) 266 + err = db.RemoveXPForSession(tx, did, e.Commit.RKey, logger) 267 267 if err != nil { 268 268 tx.Rollback() 269 - return fmt.Errorf("failed to delete study session record: %w", err) 269 + return fmt.Errorf("failed to remove xp for session: %w", err) 270 270 } 271 271 272 - err = db.RemoveXPForSession(tx, did, e.Commit.RKey) 272 + err = db.DeleteStudySessionByRkey(tx, did, e.Commit.RKey) 273 273 if err != nil { 274 274 tx.Rollback() 275 - return fmt.Errorf("failed to remove xp for session: %w", err) 275 + return fmt.Errorf("failed to delete study session record: %w", err) 276 276 } 277 277 278 278 return tx.Commit()

History

1 round 0 comments
sign up or login to add to the discussion
brookjeynes.dev submitted #0
1 commit
expand
fix: xp not getting calculated correctly when a study session is deleted
expand 0 comments
pull request successfully merged