summaryrefslogtreecommitdiff
path: root/internal/processing
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing')
-rw-r--r--internal/processing/account/delete.go5
-rw-r--r--internal/processing/app.go2
-rw-r--r--internal/processing/status/status_test.go5
3 files changed, 5 insertions, 7 deletions
diff --git a/internal/processing/account/delete.go b/internal/processing/account/delete.go
index 318f4f1e5..5de706045 100644
--- a/internal/processing/account/delete.go
+++ b/internal/processing/account/delete.go
@@ -27,7 +27,6 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/messages"
- "github.com/superseriousbusiness/gotosocial/internal/oauth"
)
// Delete handles the complete deletion of an account.
@@ -66,12 +65,12 @@ func (p *processor) Delete(ctx context.Context, account *gtsmodel.Account, origi
u := &gtsmodel.User{}
if err := p.db.GetWhere(ctx, []db.Where{{Key: "account_id", Value: account.ID}}, u); err == nil {
// we got one! select all tokens with the user's ID
- tokens := []*oauth.Token{}
+ tokens := []*gtsmodel.Token{}
if err := p.db.GetWhere(ctx, []db.Where{{Key: "user_id", Value: u.ID}}, &tokens); err == nil {
// we have some tokens to delete
for _, t := range tokens {
// delete client(s) associated with this token
- if err := p.db.DeleteByID(ctx, t.ClientID, &oauth.Client{}); err != nil {
+ if err := p.db.DeleteByID(ctx, t.ClientID, &gtsmodel.Client{}); err != nil {
l.Errorf("error deleting oauth client: %s", err)
}
// delete application(s) associated with this token
diff --git a/internal/processing/app.go b/internal/processing/app.go
index 4f805572b..fc6814196 100644
--- a/internal/processing/app.go
+++ b/internal/processing/app.go
@@ -68,7 +68,7 @@ func (p *processor) AppCreate(ctx context.Context, authed *oauth.Auth, form *api
}
// now we need to model an oauth client from the application that the oauth library can use
- oc := &oauth.Client{
+ oc := &gtsmodel.Client{
ID: clientID,
Secret: clientSecret,
Domain: form.RedirectURIs,
diff --git a/internal/processing/status/status_test.go b/internal/processing/status/status_test.go
index 90f4187a9..707a4843b 100644
--- a/internal/processing/status/status_test.go
+++ b/internal/processing/status/status_test.go
@@ -25,7 +25,6 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/messages"
- "github.com/superseriousbusiness/gotosocial/internal/oauth"
"github.com/superseriousbusiness/gotosocial/internal/processing/status"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
)
@@ -40,8 +39,8 @@ type StatusStandardTestSuite struct {
fromClientAPIChan chan messages.FromClientAPI
// standard suite models
- testTokens map[string]*oauth.Token
- testClients map[string]*oauth.Client
+ testTokens map[string]*gtsmodel.Token
+ testClients map[string]*gtsmodel.Client
testApplications map[string]*gtsmodel.Application
testUsers map[string]*gtsmodel.User
testAccounts map[string]*gtsmodel.Account