Switch to SQLite for activity tracking
This commit is contained in:
@@ -30,7 +30,7 @@ type Client interface {
|
||||
SetInstallationStatus(ctx context.Context, uuid string, successful bool) error
|
||||
SetTransferStatus(ctx context.Context, uuid string, successful bool) error
|
||||
ValidateSftpCredentials(ctx context.Context, request SftpAuthRequest) (SftpAuthResponse, error)
|
||||
SendActivityLogs(ctx context.Context, activity []json.RawMessage) error
|
||||
SendActivityLogs(ctx context.Context, activity interface{}) error
|
||||
}
|
||||
|
||||
type client struct {
|
||||
|
||||
@@ -3,7 +3,6 @@ package remote
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/goccy/go-json"
|
||||
"strconv"
|
||||
"sync"
|
||||
|
||||
@@ -180,7 +179,7 @@ func (c *client) SendRestorationStatus(ctx context.Context, backup string, succe
|
||||
}
|
||||
|
||||
// SendActivityLogs sends activity logs back to the Panel for processing.
|
||||
func (c *client) SendActivityLogs(ctx context.Context, activity []json.RawMessage) error {
|
||||
func (c *client) SendActivityLogs(ctx context.Context, activity interface{}) error {
|
||||
resp, err := c.Post(ctx, "/activity", d{"data": activity})
|
||||
if err != nil {
|
||||
return errors.WithStackIf(err)
|
||||
|
||||
Reference in New Issue
Block a user