mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-12 05:08:06 -06:00
lint + fmt
This commit is contained in:
parent
54c34feee8
commit
8640fc2b00
3 changed files with 21 additions and 21 deletions
|
|
@ -277,16 +277,16 @@ func main() {
|
||||||
Usage: "create a new account",
|
Usage: "create a new account",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: config.UsernameFlag,
|
Name: config.UsernameFlag,
|
||||||
Usage: config.UsernameUsage,
|
Usage: config.UsernameUsage,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: config.EmailFlag,
|
Name: config.EmailFlag,
|
||||||
Usage: config.EmailUsage,
|
Usage: config.EmailUsage,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: config.PasswordFlag,
|
Name: config.PasswordFlag,
|
||||||
Usage: config.PasswordUsage,
|
Usage: config.PasswordUsage,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
|
@ -298,8 +298,8 @@ func main() {
|
||||||
Usage: "confirm an existing account manually, thereby skipping email confirmation",
|
Usage: "confirm an existing account manually, thereby skipping email confirmation",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: config.UsernameFlag,
|
Name: config.UsernameFlag,
|
||||||
Usage: config.UsernameUsage,
|
Usage: config.UsernameUsage,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
|
@ -311,8 +311,8 @@ func main() {
|
||||||
Usage: "promote an account to admin",
|
Usage: "promote an account to admin",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: config.UsernameFlag,
|
Name: config.UsernameFlag,
|
||||||
Usage: config.UsernameUsage,
|
Usage: config.UsernameUsage,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
|
@ -324,8 +324,8 @@ func main() {
|
||||||
Usage: "demote an account from admin to normal user",
|
Usage: "demote an account from admin to normal user",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: config.UsernameFlag,
|
Name: config.UsernameFlag,
|
||||||
Usage: config.UsernameUsage,
|
Usage: config.UsernameUsage,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
|
@ -337,8 +337,8 @@ func main() {
|
||||||
Usage: "prevent an account from signing in or posting etc, but don't delete anything",
|
Usage: "prevent an account from signing in or posting etc, but don't delete anything",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: config.UsernameFlag,
|
Name: config.UsernameFlag,
|
||||||
Usage: config.UsernameUsage,
|
Usage: config.UsernameUsage,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
|
@ -350,8 +350,8 @@ func main() {
|
||||||
Usage: "completely remove an account and all of its posts, media, etc",
|
Usage: "completely remove an account and all of its posts, media, etc",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: config.UsernameFlag,
|
Name: config.UsernameFlag,
|
||||||
Usage: config.UsernameUsage,
|
Usage: config.UsernameUsage,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
|
|
||||||
|
|
@ -560,7 +560,7 @@ func (f *federatingDB) Update(ctx context.Context, asType vocab.Type) error {
|
||||||
typeName == gtsmodel.ActivityStreamsOrganization ||
|
typeName == gtsmodel.ActivityStreamsOrganization ||
|
||||||
typeName == gtsmodel.ActivityStreamsPerson ||
|
typeName == gtsmodel.ActivityStreamsPerson ||
|
||||||
typeName == gtsmodel.ActivityStreamsService {
|
typeName == gtsmodel.ActivityStreamsService {
|
||||||
// it's an UPDATE to some kind of account
|
// it's an UPDATE to some kind of account
|
||||||
var accountable typeutils.Accountable
|
var accountable typeutils.Accountable
|
||||||
|
|
||||||
switch asType.GetTypeName() {
|
switch asType.GetTypeName() {
|
||||||
|
|
@ -671,7 +671,7 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error {
|
||||||
s := >smodel.Status{}
|
s := >smodel.Status{}
|
||||||
if err := f.db.GetWhere(where, s); err == nil {
|
if err := f.db.GetWhere(where, s); err == nil {
|
||||||
// it's a status
|
// it's a status
|
||||||
l.Debug("uri is for status with id: %s", s.ID)
|
l.Debugf("uri is for status with id: %s", s.ID)
|
||||||
if err := f.db.DeleteByID(s.ID, >smodel.Status{}); err != nil {
|
if err := f.db.DeleteByID(s.ID, >smodel.Status{}); err != nil {
|
||||||
return fmt.Errorf("Delete: err deleting status: %s", err)
|
return fmt.Errorf("Delete: err deleting status: %s", err)
|
||||||
}
|
}
|
||||||
|
|
@ -686,7 +686,7 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error {
|
||||||
a := >smodel.Account{}
|
a := >smodel.Account{}
|
||||||
if err := f.db.GetWhere(where, a); err == nil {
|
if err := f.db.GetWhere(where, a); err == nil {
|
||||||
// it's an account
|
// it's an account
|
||||||
l.Debug("uri is for an account with id: %s", s.ID)
|
l.Debugf("uri is for an account with id: %s", s.ID)
|
||||||
if err := f.db.DeleteByID(a.ID, >smodel.Account{}); err != nil {
|
if err := f.db.DeleteByID(a.ID, >smodel.Account{}); err != nil {
|
||||||
return fmt.Errorf("Delete: err deleting account: %s", err)
|
return fmt.Errorf("Delete: err deleting account: %s", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,8 @@ func (p *processor) FollowRequestAccept(auth *oauth.Auth, accountID string) (*ap
|
||||||
APObjectType: gtsmodel.ActivityStreamsFollow,
|
APObjectType: gtsmodel.ActivityStreamsFollow,
|
||||||
APActivityType: gtsmodel.ActivityStreamsAccept,
|
APActivityType: gtsmodel.ActivityStreamsAccept,
|
||||||
GTSModel: follow,
|
GTSModel: follow,
|
||||||
OriginAccount: originAccount,
|
OriginAccount: originAccount,
|
||||||
TargetAccount: targetAccount,
|
TargetAccount: targetAccount,
|
||||||
}
|
}
|
||||||
|
|
||||||
gtsR, err := p.db.GetRelationship(auth.Account.ID, accountID)
|
gtsR, err := p.db.GetRelationship(auth.Account.ID, accountID)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue