manul sync backend works now
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
package structs
|
||||
|
||||
type SyncData struct {
|
||||
Followers []FanslyFollowResponse `json:"followers"` // List of followers
|
||||
Subscriptions []Subscription `json:"subscriptions"` // List of subscriptions
|
||||
Followers []string `json:"followers"` // List of followers
|
||||
Subscriptions []Subscription `json:"subscriptions"` // List of subscriptions
|
||||
PasteURL string `json:"paste_url"` // URL of the paste
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
@ -35,7 +36,7 @@ func NewConfig() *Config {
|
||||
SyncInterval: 8,
|
||||
LastSyncTime: "",
|
||||
LastSyncData: SyncData{
|
||||
Followers: []FanslyFollowResponse{},
|
||||
Followers: []string{},
|
||||
Subscriptions: []Subscription{},
|
||||
},
|
||||
}
|
||||
@ -51,7 +52,7 @@ func NewConfigFromOld(oldConfig *OldConfig) *Config {
|
||||
SyncInterval: oldConfig.SyncInterval,
|
||||
LastSyncTime: "",
|
||||
LastSyncData: SyncData{
|
||||
Followers: []FanslyFollowResponse{},
|
||||
Followers: []string{},
|
||||
Subscriptions: []Subscription{},
|
||||
},
|
||||
}
|
||||
|
@ -5,14 +5,17 @@ type FanslyBaseResponse[T any] struct {
|
||||
Response T `json:"response"` // The response data, type of T
|
||||
}
|
||||
|
||||
type FanslyBaseResponseAsArray[T any] struct {
|
||||
Success bool `json:"success"` // Indicates if the request was successful
|
||||
Response []T `json:"response"` // The response data, type of T
|
||||
}
|
||||
|
||||
type FanslyAccountResponse struct {
|
||||
Account FanslyAccount `json:"account"`
|
||||
}
|
||||
|
||||
type FanslyFollowResponse struct {
|
||||
Followers []struct {
|
||||
FollowerID string `json:"followerId"` // The ID of the follower
|
||||
}
|
||||
FollowerID string `json:"followerId"` // The ID of the follower
|
||||
}
|
||||
|
||||
type FanslySubscriptionResponse struct {
|
||||
|
@ -4,7 +4,7 @@ type SyncProgressEvent struct {
|
||||
// The current step of the sync process.
|
||||
Step string `json:"step"`
|
||||
// The current percent done of the sync process.
|
||||
PercentDone int `json:"percent_done"`
|
||||
PercentDone float64 `json:"percent_done"`
|
||||
// The current count of the current step of the sync process.
|
||||
Count int `json:"current_count"`
|
||||
// The total count of the current step of the sync process.
|
||||
|
Reference in New Issue
Block a user