Changeset 676 in code for trunk/service.go


Ignore:
Timestamp:
Nov 8, 2021, 6:36:10 PM (4 years ago)
Author:
contact
Message:

Add context support to user and network mutations

References: https://todo.sr.ht/~emersion/soju/141

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/service.go

    r664 r676  
    491491        }
    492492
    493         network, err := dc.user.createNetwork(record)
     493        network, err := dc.user.createNetwork(context.TODO(), record)
    494494        if err != nil {
    495495                return fmt.Errorf("could not create network: %v", err)
     
    566566        }
    567567
    568         network, err := dc.user.updateNetwork(&record)
     568        network, err := dc.user.updateNetwork(context.TODO(), &record)
    569569        if err != nil {
    570570                return fmt.Errorf("could not update network: %v", err)
     
    585585        }
    586586
    587         if err := dc.user.deleteNetwork(net.ID); err != nil {
     587        if err := dc.user.deleteNetwork(context.TODO(), net.ID); err != nil {
    588588                return err
    589589        }
     
    838838                }
    839839
    840                 if err := dc.user.updateUser(&record); err != nil {
     840                if err := dc.user.updateUser(context.TODO(), &record); err != nil {
    841841                        return err
    842842                }
Note: See TracChangeset for help on using the changeset viewer.