diff options
| author | 2021-03-22 22:26:54 +0100 | |
|---|---|---|
| committer | 2021-03-22 22:26:54 +0100 | |
| commit | aa9ce272dcfa1380b2f05bc3a90ef8ca1b0a7f62 (patch) | |
| tree | f3e01f5434a2f90007969373f0fa32dc855207c7 /internal/gotosocial | |
| parent | fix lint errors (diff) | |
| download | gotosocial-aa9ce272dcfa1380b2f05bc3a90ef8ca1b0a7f62.tar.xz | |
Oauth/token (#7)
* add host and protocol options
* some fiddling
* tidying up and comments
* tick off /oauth/token
* tidying a bit
* tidying
* go mod tidy
* allow attaching middleware to server
* add middleware
* more user friendly
* add comments
* comments
* store account + app
* tidying
* lots of restructuring
* lint + tidy
Diffstat (limited to 'internal/gotosocial')
| -rw-r--r-- | internal/gotosocial/actions.go | 6 | ||||
| -rw-r--r-- | internal/gotosocial/gotosocial.go | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/internal/gotosocial/actions.go b/internal/gotosocial/actions.go index 3d3fdc366..398c0b44f 100644 --- a/internal/gotosocial/actions.go +++ b/internal/gotosocial/actions.go @@ -38,9 +38,9 @@ var Run action.GTSAction = func(ctx context.Context, c *config.Config, log *logr return fmt.Errorf("error creating dbservice: %s", err) } - if err := dbService.CreateSchema(ctx); err != nil { - return fmt.Errorf("error creating dbschema: %s", err) - } + // if err := dbService.CreateSchema(ctx); err != nil { + // return fmt.Errorf("error creating dbschema: %s", err) + // } // catch shutdown signals from the operating system sigs := make(chan os.Signal, 1) diff --git a/internal/gotosocial/gotosocial.go b/internal/gotosocial/gotosocial.go index 4409e85de..d9fb29527 100644 --- a/internal/gotosocial/gotosocial.go +++ b/internal/gotosocial/gotosocial.go @@ -22,10 +22,10 @@ import ( "context" "github.com/go-fed/activity/pub" - "github.com/gotosocial/gotosocial/internal/api" "github.com/gotosocial/gotosocial/internal/cache" "github.com/gotosocial/gotosocial/internal/config" "github.com/gotosocial/gotosocial/internal/db" + "github.com/gotosocial/gotosocial/internal/router" ) type Gotosocial interface { @@ -33,11 +33,11 @@ type Gotosocial interface { Stop(context.Context) error } -func New(db db.DB, cache cache.Cache, clientAPI api.Server, federationAPI pub.FederatingActor, config *config.Config) (Gotosocial, error) { +func New(db db.DB, cache cache.Cache, apiRouter router.Router, federationAPI pub.FederatingActor, config *config.Config) (Gotosocial, error) { return &gotosocial{ db: db, cache: cache, - clientAPI: clientAPI, + apiRouter: apiRouter, federationAPI: federationAPI, config: config, }, nil @@ -46,7 +46,7 @@ func New(db db.DB, cache cache.Cache, clientAPI api.Server, federationAPI pub.Fe type gotosocial struct { db db.DB cache cache.Cache - clientAPI api.Server + apiRouter router.Router federationAPI pub.FederatingActor config *config.Config } |
