()
| 32 | var cachedTosAgreedTs atomic.Int64 |
| 33 | |
| 34 | func GetTosAgreedTs() int64 { |
| 35 | cached := cachedTosAgreedTs.Load() |
| 36 | if cached != 0 { |
| 37 | return cached |
| 38 | } |
| 39 | |
| 40 | ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) |
| 41 | defer cancel() |
| 42 | client, err := wstore.DBGetSingleton[*waveobj.Client](ctx) |
| 43 | if err != nil || client == nil || client.TosAgreed == 0 { |
| 44 | return 0 |
| 45 | } |
| 46 | |
| 47 | cachedTosAgreedTs.Store(client.TosAgreed) |
| 48 | return client.TosAgreed |
| 49 | } |
| 50 | |
| 51 | type ActivityType struct { |
| 52 | Day string `json:"day"` |
no outgoing calls
no test coverage detected