feat: change email, export my data, delete account (with data anonymization)
This commit is contained in:
1 parent
bb191c389a
commit
10a66cd979
123 files changed
+10789
-76
No files matched your search
@@ -83,6 +83,8 @@ type mockImageRepo struct {
|
||||
onDelete func(id uint32)
|
||||
|
||||
storedNameLookups int
|
||||
uploaderLists int
|
||||
onListByUploader func()
|
||||
}
|
||||
|
||||
func newMockImageRepo() *mockImageRepo {
|
||||
@@ -114,6 +116,23 @@ func (m *mockImageRepo) Create(input imageDomain.Image) (imageDomain.Image, erro
|
||||
return img, nil
|
||||
}
|
||||
|
||||
func (m *mockImageRepo) ListByUploader(userID uint32) ([]imageDomain.Image, error) {
|
||||
m.uploaderLists++
|
||||
if m.onListByUploader != nil {
|
||||
m.onListByUploader()
|
||||
}
|
||||
if err := m.fail.trigger("ListByUploader"); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
listed := []imageDomain.Image{}
|
||||
for _, img := range m.sortedImages() {
|
||||
if img.UploadedByID == userID {
|
||||
listed = append(listed, img)
|
||||
}
|
||||
}
|
||||
return listed, nil
|
||||
}
|
||||
|
||||
func (m *mockImageRepo) ListMissingMetadata() ([]imageDomain.Image, error) {
|
||||
if err := m.fail.trigger("ListMissingMetadata"); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user