mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:52:25 -05:00
[feature] Allow import of following and blocks via CSV (#3150)
* [feature] Import follows + blocks via settings panel * test import follows
This commit is contained in:
parent
697261da53
commit
7b5917d6ae
25 changed files with 1247 additions and 50 deletions
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package model
|
||||
|
||||
import "mime/multipart"
|
||||
|
||||
// AccountExportStats models an account's stats
|
||||
// specifically for the purpose of informing about
|
||||
// export sizes at the /api/v1/exports/stats endpoint.
|
||||
|
|
@ -58,3 +60,23 @@ type AccountExportStats struct {
|
|||
// example: 11
|
||||
MutesCount int `json:"mutes_count"`
|
||||
}
|
||||
|
||||
// AttachmentRequest models media attachment creation parameters.
|
||||
//
|
||||
// swagger: ignore
|
||||
type ImportRequest struct {
|
||||
// The CSV data to upload.
|
||||
Data *multipart.FileHeader `form:"data" binding:"required"`
|
||||
// Type of entries contained in the data file.
|
||||
//
|
||||
// - `following` - accounts to follow.
|
||||
// - `lists` - lists of accounts.
|
||||
// - `blocks` - accounts to block.
|
||||
// - `mutes` - accounts to mute.
|
||||
// - `bookmarks` - statuses to bookmark.
|
||||
Type string `form:"type" binding:"required"`
|
||||
// Mode to use when creating entries from the data file:
|
||||
// - `merge` to merge entries in file with existing entries.
|
||||
// - `overwrite` to replace existing entries with entries in file.
|
||||
Mode string `form:"mode"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue