refactor: renamed "IsUserInListByListItem" to "IsUserInListByItemID"
This commit is contained in:
@@ -37,7 +37,7 @@ type ListRepository interface {
|
|||||||
AddUserToList(ctx context.Context, listID string, userID string) error
|
AddUserToList(ctx context.Context, listID string, userID string) error
|
||||||
RemoveUserFromList(ctx context.Context, listID string, userID string) error
|
RemoveUserFromList(ctx context.Context, listID string, userID string) error
|
||||||
IsUserInList(ctx context.Context, listID string, userID string) (bool, error)
|
IsUserInList(ctx context.Context, listID string, userID string) (bool, error)
|
||||||
IsUserInListByListItem(ctx context.Context, listItemID string, userID string) (bool, error)
|
IsUserInListByItemID(ctx context.Context, listItemID string, userID string) (bool, error)
|
||||||
CreateListItem(ctx context.Context, listID string, title string) (*ListItem, error)
|
CreateListItem(ctx context.Context, listID string, title string) (*ListItem, error)
|
||||||
UpdateListItem(ctx context.Context, listItemID string, title string, isCompleted bool) error
|
UpdateListItem(ctx context.Context, listItemID string, title string, isCompleted bool) error
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ func (r *ListRepo) IsUserInList(ctx context.Context, listID string, userID strin
|
|||||||
return cnt > 0, nil
|
return cnt > 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *ListRepo) IsUserInListByListItem(ctx context.Context, listItemID string, userID string) (bool, error) {
|
func (r *ListRepo) IsUserInListByItemID(ctx context.Context, listItemID string, userID string) (bool, error) {
|
||||||
var cnt int
|
var cnt int
|
||||||
|
|
||||||
err := r.db.QueryRowContext(ctx,
|
err := r.db.QueryRowContext(ctx,
|
||||||
|
|||||||
Reference in New Issue
Block a user