mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update method name
This commit is contained in:
@@ -25,6 +25,6 @@ func (s *Store) CreateActivity(ctx context.Context, create *Activity) (*Activity
|
|||||||
return s.driver.CreateActivity(ctx, create)
|
return s.driver.CreateActivity(ctx, create)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Store) ListActivity(ctx context.Context, find *FindActivity) ([]*Activity, error) {
|
func (s *Store) ListActivities(ctx context.Context, find *FindActivity) ([]*Activity, error) {
|
||||||
return s.driver.ListActivities(ctx, find)
|
return s.driver.ListActivities(ctx, find)
|
||||||
}
|
}
|
||||||
|
@@ -12,7 +12,7 @@ func (d *DB) CreateInbox(ctx context.Context, create *store.Inbox) (*store.Inbox
|
|||||||
}
|
}
|
||||||
|
|
||||||
// nolint
|
// nolint
|
||||||
func (d *DB) ListInboxes(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) {
|
func (d *DB) ListInbox(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -36,7 +36,7 @@ func (d *DB) CreateInbox(ctx context.Context, create *store.Inbox) (*store.Inbox
|
|||||||
return create, nil
|
return create, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *DB) ListInboxes(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) {
|
func (d *DB) ListInbox(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) {
|
||||||
where, args := []string{"1 = 1"}, []any{}
|
where, args := []string{"1 = 1"}, []any{}
|
||||||
|
|
||||||
if find.ID != nil {
|
if find.ID != nil {
|
||||||
|
@@ -84,7 +84,7 @@ type Driver interface {
|
|||||||
|
|
||||||
// Inbox model related methods.
|
// Inbox model related methods.
|
||||||
CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error)
|
CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error)
|
||||||
ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error)
|
ListInbox(ctx context.Context, find *FindInbox) ([]*Inbox, error)
|
||||||
UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error)
|
UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error)
|
||||||
DeleteInbox(ctx context.Context, delete *DeleteInbox) error
|
DeleteInbox(ctx context.Context, delete *DeleteInbox) error
|
||||||
}
|
}
|
||||||
|
@@ -44,8 +44,8 @@ func (s *Store) CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error)
|
|||||||
return s.driver.CreateInbox(ctx, create)
|
return s.driver.CreateInbox(ctx, create)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Store) ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error) {
|
func (s *Store) ListInbox(ctx context.Context, find *FindInbox) ([]*Inbox, error) {
|
||||||
return s.driver.ListInboxes(ctx, find)
|
return s.driver.ListInbox(ctx, find)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Store) UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error) {
|
func (s *Store) UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error) {
|
||||||
|
@@ -30,7 +30,7 @@ func TestInboxStore(t *testing.T) {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.NotNil(t, inbox)
|
require.NotNil(t, inbox)
|
||||||
require.Equal(t, create.Message, inbox.Message)
|
require.Equal(t, create.Message, inbox.Message)
|
||||||
inboxes, err := ts.ListInboxes(ctx, &store.FindInbox{
|
inboxes, err := ts.ListInbox(ctx, &store.FindInbox{
|
||||||
ReceiverID: &user.ID,
|
ReceiverID: &user.ID,
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
@@ -47,7 +47,7 @@ func TestInboxStore(t *testing.T) {
|
|||||||
ID: inbox.ID,
|
ID: inbox.ID,
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
inboxes, err = ts.ListInboxes(ctx, &store.FindInbox{
|
inboxes, err = ts.ListInbox(ctx, &store.FindInbox{
|
||||||
ReceiverID: &user.ID,
|
ReceiverID: &user.ID,
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
Reference in New Issue
Block a user