mirror of
https://github.com/Walter-Sparrow/lunar-tear.git
synced 2026-07-02 05:43:41 +03:00
Add SQLite persistence, import-snapshot tool, and karma functionality
This commit is contained in:
@@ -28,7 +28,7 @@ func (s *ConsumableItemServiceServer) Sell(ctx context.Context, req *pb.Consumab
|
||||
|
||||
userId := currentUserId(ctx, s.users, s.sessions)
|
||||
|
||||
oldUser, _ := s.users.SnapshotUser(userId)
|
||||
oldUser, _ := s.users.LoadUser(userId)
|
||||
tracker := userdata.NewDeleteTracker().
|
||||
Track("IUserConsumableItem", oldUser, userdata.SortedConsumableItemRecords, []string{"userId", "consumableItemId"})
|
||||
|
||||
@@ -66,7 +66,7 @@ func (s *ConsumableItemServiceServer) Sell(ctx context.Context, req *pb.Consumab
|
||||
return nil, fmt.Errorf("consumable item sell: %w", err)
|
||||
}
|
||||
|
||||
tables := userdata.SelectTables(userdata.FullClientTableMap(snapshot), []string{"IUserConsumableItem"})
|
||||
tables := userdata.ProjectTables(snapshot, []string{"IUserConsumableItem"})
|
||||
diff := tracker.Apply(snapshot, tables)
|
||||
|
||||
return &pb.ConsumableItemSellResponse{
|
||||
|
||||
Reference in New Issue
Block a user