mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-09 23:17:55 +02:00
Wire through a flag so that we can track when installations come from tests, and delete those from the DB more aggressively
This commit is contained in:
@ -83,7 +83,11 @@ func Setup(userSecret string, isOffline bool) error {
|
||||
return nil
|
||||
}
|
||||
ctx := hctx.MakeContext()
|
||||
_, err = ApiGet(ctx, "/api/v1/register?user_id="+data.UserId(userSecret)+"&device_id="+config.DeviceId)
|
||||
registerPath := "/api/v1/register?user_id=" + data.UserId(userSecret) + "&device_id=" + config.DeviceId
|
||||
if os.Getenv("HISHTORY_TEST") != "" {
|
||||
registerPath += "&is_integration_test_device=true"
|
||||
}
|
||||
_, err = ApiGet(ctx, registerPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to register device with backend: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user