summaryrefslogtreecommitdiff
path: root/internal/processing/account/delete.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-09-01 11:45:01 +0200
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-09-01 11:45:01 +0200
commit684bd56528c5ffa37af8340b8b141fe390dd05a4 (patch)
tree4a78d70c2ca7f15e47f8a2e6bc51d62c99b0f52d /internal/processing/account/delete.go
parentMerge branch 'struct_validation' of github.com:superseriousbusiness/gotosocia... (diff)
downloadgotosocial-684bd56528c5ffa37af8340b8b141fe390dd05a4.tar.xz
move oauth models into gtsmodel
Diffstat (limited to 'internal/processing/account/delete.go')
-rw-r--r--internal/processing/account/delete.go5
1 files changed, 2 insertions, 3 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